/*
** Lua binding: luaBox2D
** Generated automatically by tolua++-1.0.92 on 09/04/12 23:58:55.
*/

#ifndef __cplusplus
#include "stdlib.h"
#endif
#include "string.h"

#include "tolua++.h"

/* Exported function */
TOLUA_API int  tolua_luaBox2D_open (lua_State* tolua_S);

#include "LuaCocos2d.h"
#include "tolua_fix.h"
#include "Box2D/Box2D.h"
#include "Box2D/Box2D.h"
#include "Box2D/Box2D.h"
#include "Box2D/Box2D.h"
#include "Box2D/Box2D.h"
#include "WorldCallbacks.h"
#include "Box2D/Box2D.h"

/* function to release collected object via destructor */
#ifdef __cplusplus

static int tolua_collect_b2BodyType (lua_State* tolua_S)
{
 b2BodyType* self = (b2BodyType*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_b2BodyDef (lua_State* tolua_S)
{
 b2BodyDef* self = (b2BodyDef*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_b2Transform (lua_State* tolua_S)
{
 b2Transform* self = (b2Transform*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_b2Vec2 (lua_State* tolua_S)
{
 b2Vec2* self = (b2Vec2*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_b2Filter (lua_State* tolua_S)
{
 b2Filter* self = (b2Filter*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_QueryCallback (lua_State* tolua_S)
{
 QueryCallback* self = (QueryCallback*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_b2ClipVertex (lua_State* tolua_S)
{
 b2ClipVertex* self = (b2ClipVertex*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_b2AABB (lua_State* tolua_S)
{
 b2AABB* self = (b2AABB*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_b2Shape__Type (lua_State* tolua_S)
{
 b2Shape::Type* self = (b2Shape::Type*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_b2FixtureDef (lua_State* tolua_S)
{
 b2FixtureDef* self = (b2FixtureDef*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}

static int tolua_collect_b2World (lua_State* tolua_S)
{
 b2World* self = (b2World*) tolua_tousertype(tolua_S,1,0);
	Mtolua_delete(self);
	return 0;
}
#endif


/* function to register type */
static void tolua_reg_types (lua_State* tolua_S)
{
 tolua_usertype(tolua_S,"b2BodyType");
 tolua_usertype(tolua_S,"b2Shape");
 tolua_usertype(tolua_S,"b2JointEdge");
 tolua_usertype(tolua_S,"b2Transform");
 tolua_usertype(tolua_S,"b2Fixture");
 tolua_usertype(tolua_S,"b2ContactManager");
 tolua_usertype(tolua_S,"b2JointDef");
 tolua_usertype(tolua_S,"b2ContactFeature");
 tolua_usertype(tolua_S,"b2FixtureDef");
 tolua_usertype(tolua_S,"b2FixtureProxy");
 tolua_usertype(tolua_S,"b2MassData");
 tolua_usertype(tolua_S,"b2ClipVertex");
 tolua_usertype(tolua_S,"LUA_FUNCTION");
 tolua_usertype(tolua_S,"b2Contact");
 tolua_usertype(tolua_S,"b2Rot");
 tolua_usertype(tolua_S,"b2RayCastInput");
 tolua_usertype(tolua_S,"b2RayCastOutput");
 tolua_usertype(tolua_S,"b2Vec2");
 tolua_usertype(tolua_S,"b2Filter");
 tolua_usertype(tolua_S,"QueryCallback");
 tolua_usertype(tolua_S,"b2Joint");
 tolua_usertype(tolua_S,"b2CircleShape");
 tolua_usertype(tolua_S,"b2RayCastCallback");
 tolua_usertype(tolua_S,"b2Manifold");
 tolua_usertype(tolua_S,"b2EdgeShape");
 tolua_usertype(tolua_S,"b2Shape::Type");
 tolua_usertype(tolua_S,"b2Profile");
 tolua_usertype(tolua_S,"b2BodyDef");
 tolua_usertype(tolua_S,"b2PolygonShape");
 tolua_usertype(tolua_S,"b2AABB");
 tolua_usertype(tolua_S,"b2ContactID");
 tolua_usertype(tolua_S,"b2ContactEdge");
 tolua_usertype(tolua_S,"b2Draw");
 tolua_usertype(tolua_S,"b2DestructionListener");
 tolua_usertype(tolua_S,"b2QueryCallback");
 tolua_usertype(tolua_S,"b2World");
 tolua_usertype(tolua_S,"b2Body");
 tolua_usertype(tolua_S,"b2ContactListener");
 tolua_usertype(tolua_S,"b2ContactFilter");
}

/* method: new of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_new00
static int tolua_luaBox2D_b2World_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2World",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Vec2* gravity = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
  {
   b2World* tolua_ret = (b2World*)  Mtolua_new((b2World)(*gravity));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2World");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_new00_local
static int tolua_luaBox2D_b2World_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2World",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Vec2* gravity = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
  {
   b2World* tolua_ret = (b2World*)  Mtolua_new((b2World)(*gravity));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2World");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: delete of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_delete00
static int tolua_luaBox2D_b2World_delete00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL);
#endif
  Mtolua_delete(self);
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetDestructionListener of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetDestructionListener00
static int tolua_luaBox2D_b2World_SetDestructionListener00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2DestructionListener",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  b2DestructionListener* listener = ((b2DestructionListener*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDestructionListener'", NULL);
#endif
  {
   self->SetDestructionListener(listener);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetDestructionListener'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetContactFilter of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetContactFilter00
static int tolua_luaBox2D_b2World_SetContactFilter00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2ContactFilter",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  b2ContactFilter* filter = ((b2ContactFilter*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetContactFilter'", NULL);
#endif
  {
   self->SetContactFilter(filter);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetContactFilter'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetContactListener of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetContactListener00
static int tolua_luaBox2D_b2World_SetContactListener00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2ContactListener",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  b2ContactListener* listener = ((b2ContactListener*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetContactListener'", NULL);
#endif
  {
   self->SetContactListener(listener);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetContactListener'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetDebugDraw of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetDebugDraw00
static int tolua_luaBox2D_b2World_SetDebugDraw00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2Draw",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  b2Draw* debugDraw = ((b2Draw*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDebugDraw'", NULL);
#endif
  {
   self->SetDebugDraw(debugDraw);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetDebugDraw'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: CreateBody of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_CreateBody00
static int tolua_luaBox2D_b2World_CreateBody00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2BodyDef",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  const b2BodyDef* def = ((const b2BodyDef*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CreateBody'", NULL);
#endif
  {
   b2Body* tolua_ret = (b2Body*)  self->CreateBody(def);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Body");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'CreateBody'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: DestroyBody of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_DestroyBody00
static int tolua_luaBox2D_b2World_DestroyBody00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  b2Body* body = ((b2Body*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DestroyBody'", NULL);
#endif
  {
   self->DestroyBody(body);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'DestroyBody'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: CreateJoint of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_CreateJoint00
static int tolua_luaBox2D_b2World_CreateJoint00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2JointDef",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  const b2JointDef* def = ((const b2JointDef*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CreateJoint'", NULL);
#endif
  {
   b2Joint* tolua_ret = (b2Joint*)  self->CreateJoint(def);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Joint");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'CreateJoint'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: DestroyJoint of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_DestroyJoint00
static int tolua_luaBox2D_b2World_DestroyJoint00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2Joint",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  b2Joint* joint = ((b2Joint*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DestroyJoint'", NULL);
#endif
  {
   self->DestroyJoint(joint);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'DestroyJoint'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Step of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_Step00
static int tolua_luaBox2D_b2World_Step00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
   float timeStep = ((  float)  tolua_tonumber(tolua_S,2,0));
  signed int velocityIterations = (( signed int)  tolua_tonumber(tolua_S,3,0));
  signed int positionIterations = (( signed int)  tolua_tonumber(tolua_S,4,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Step'", NULL);
#endif
  {
   self->Step(timeStep,velocityIterations,positionIterations);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Step'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: ClearForces of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_ClearForces00
static int tolua_luaBox2D_b2World_ClearForces00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ClearForces'", NULL);
#endif
  {
   self->ClearForces();
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'ClearForces'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: DrawDebugData of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_DrawDebugData00
static int tolua_luaBox2D_b2World_DrawDebugData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DrawDebugData'", NULL);
#endif
  {
   self->DrawDebugData();
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'DrawDebugData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: QueryAABB of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_QueryAABB00
static int tolua_luaBox2D_b2World_QueryAABB00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2QueryCallback",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2AABB",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
  b2QueryCallback* callback = ((b2QueryCallback*)  tolua_tousertype(tolua_S,2,0));
  const b2AABB* aabb = ((const b2AABB*)  tolua_tousertype(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'QueryAABB'", NULL);
#endif
  {
   self->QueryAABB(callback,*aabb);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'QueryAABB'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: RayCast of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_RayCast00
static int tolua_luaBox2D_b2World_RayCast00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2RayCastCallback",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Vec2",0,&tolua_err)) ||
     (tolua_isvaluenil(tolua_S,4,&tolua_err) || !tolua_isusertype(tolua_S,4,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
  b2RayCastCallback* callback = ((b2RayCastCallback*)  tolua_tousertype(tolua_S,2,0));
  const b2Vec2* point1 = ((const b2Vec2*)  tolua_tousertype(tolua_S,3,0));
  const b2Vec2* point2 = ((const b2Vec2*)  tolua_tousertype(tolua_S,4,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RayCast'", NULL);
#endif
  {
   self->RayCast(callback,*point1,*point2);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'RayCast'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetBodyList of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetBodyList00
static int tolua_luaBox2D_b2World_GetBodyList00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBodyList'", NULL);
#endif
  {
   b2Body* tolua_ret = (b2Body*)  self->GetBodyList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Body");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetBodyList'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetBodyList of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetBodyList01
static int tolua_luaBox2D_b2World_GetBodyList01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBodyList'", NULL);
#endif
  {
   const b2Body* tolua_ret = (const b2Body*)  self->GetBodyList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2Body");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2World_GetBodyList00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetJointList of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetJointList00
static int tolua_luaBox2D_b2World_GetJointList00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetJointList'", NULL);
#endif
  {
   b2Joint* tolua_ret = (b2Joint*)  self->GetJointList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Joint");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetJointList'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetJointList of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetJointList01
static int tolua_luaBox2D_b2World_GetJointList01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetJointList'", NULL);
#endif
  {
   const b2Joint* tolua_ret = (const b2Joint*)  self->GetJointList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2Joint");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2World_GetJointList00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetContactList of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetContactList00
static int tolua_luaBox2D_b2World_GetContactList00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContactList'", NULL);
#endif
  {
   b2Contact* tolua_ret = (b2Contact*)  self->GetContactList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Contact");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetContactList'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetContactList of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetContactList01
static int tolua_luaBox2D_b2World_GetContactList01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContactList'", NULL);
#endif
  {
   const b2Contact* tolua_ret = (const b2Contact*)  self->GetContactList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2Contact");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2World_GetContactList00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetAllowSleeping of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetAllowSleeping00
static int tolua_luaBox2D_b2World_SetAllowSleeping00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAllowSleeping'", NULL);
#endif
  {
   self->SetAllowSleeping(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetAllowSleeping'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetAllowSleeping of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetAllowSleeping00
static int tolua_luaBox2D_b2World_GetAllowSleeping00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAllowSleeping'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->GetAllowSleeping();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetAllowSleeping'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetWarmStarting of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetWarmStarting00
static int tolua_luaBox2D_b2World_SetWarmStarting00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetWarmStarting'", NULL);
#endif
  {
   self->SetWarmStarting(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetWarmStarting'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetWarmStarting of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetWarmStarting00
static int tolua_luaBox2D_b2World_GetWarmStarting00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWarmStarting'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->GetWarmStarting();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetWarmStarting'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetContinuousPhysics of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetContinuousPhysics00
static int tolua_luaBox2D_b2World_SetContinuousPhysics00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetContinuousPhysics'", NULL);
#endif
  {
   self->SetContinuousPhysics(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetContinuousPhysics'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetContinuousPhysics of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetContinuousPhysics00
static int tolua_luaBox2D_b2World_GetContinuousPhysics00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContinuousPhysics'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->GetContinuousPhysics();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetContinuousPhysics'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetSubStepping of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetSubStepping00
static int tolua_luaBox2D_b2World_SetSubStepping00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSubStepping'", NULL);
#endif
  {
   self->SetSubStepping(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetSubStepping'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetSubStepping of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetSubStepping00
static int tolua_luaBox2D_b2World_GetSubStepping00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetSubStepping'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->GetSubStepping();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetSubStepping'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetProxyCount of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetProxyCount00
static int tolua_luaBox2D_b2World_GetProxyCount00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetProxyCount'", NULL);
#endif
  {
   signed int tolua_ret = ( signed int)  self->GetProxyCount();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetProxyCount'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetBodyCount of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetBodyCount00
static int tolua_luaBox2D_b2World_GetBodyCount00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBodyCount'", NULL);
#endif
  {
   signed int tolua_ret = ( signed int)  self->GetBodyCount();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetBodyCount'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetJointCount of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetJointCount00
static int tolua_luaBox2D_b2World_GetJointCount00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetJointCount'", NULL);
#endif
  {
   signed int tolua_ret = ( signed int)  self->GetJointCount();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetJointCount'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetContactCount of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetContactCount00
static int tolua_luaBox2D_b2World_GetContactCount00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContactCount'", NULL);
#endif
  {
   signed int tolua_ret = ( signed int)  self->GetContactCount();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetContactCount'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetTreeHeight of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetTreeHeight00
static int tolua_luaBox2D_b2World_GetTreeHeight00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTreeHeight'", NULL);
#endif
  {
   signed int tolua_ret = ( signed int)  self->GetTreeHeight();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetTreeHeight'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetTreeBalance of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetTreeBalance00
static int tolua_luaBox2D_b2World_GetTreeBalance00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTreeBalance'", NULL);
#endif
  {
   signed int tolua_ret = ( signed int)  self->GetTreeBalance();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetTreeBalance'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetTreeQuality of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetTreeQuality00
static int tolua_luaBox2D_b2World_GetTreeQuality00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTreeQuality'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetTreeQuality();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetTreeQuality'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetGravity of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetGravity00
static int tolua_luaBox2D_b2World_SetGravity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* gravity = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetGravity'", NULL);
#endif
  {
   self->SetGravity(*gravity);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetGravity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetGravity of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetGravity00
static int tolua_luaBox2D_b2World_GetGravity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetGravity'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetGravity();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetGravity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: IsLocked of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_IsLocked00
static int tolua_luaBox2D_b2World_IsLocked00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsLocked'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->IsLocked();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IsLocked'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetAutoClearForces of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_SetAutoClearForces00
static int tolua_luaBox2D_b2World_SetAutoClearForces00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAutoClearForces'", NULL);
#endif
  {
   self->SetAutoClearForces(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetAutoClearForces'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetAutoClearForces of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetAutoClearForces00
static int tolua_luaBox2D_b2World_GetAutoClearForces00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAutoClearForces'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->GetAutoClearForces();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetAutoClearForces'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetContactManager of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetContactManager00
static int tolua_luaBox2D_b2World_GetContactManager00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContactManager'", NULL);
#endif
  {
   const b2ContactManager& tolua_ret = (const b2ContactManager&)  self->GetContactManager();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const b2ContactManager");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetContactManager'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetProfile of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_GetProfile00
static int tolua_luaBox2D_b2World_GetProfile00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2World* self = (const b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetProfile'", NULL);
#endif
  {
   const b2Profile& tolua_ret = (const b2Profile&)  self->GetProfile();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const b2Profile");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetProfile'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Dump of class  b2World */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2World_Dump00
static int tolua_luaBox2D_b2World_Dump00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2World",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2World* self = (b2World*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Dump'", NULL);
#endif
  {
   self->Dump();
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Dump'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  b2Filter */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Filter_new00
static int tolua_luaBox2D_b2Filter_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Filter",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2Filter* tolua_ret = (b2Filter*)  Mtolua_new((b2Filter)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Filter");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  b2Filter */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Filter_new00_local
static int tolua_luaBox2D_b2Filter_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Filter",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2Filter* tolua_ret = (b2Filter*)  Mtolua_new((b2Filter)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Filter");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* get function: categoryBits of class  b2Filter */
#ifndef TOLUA_DISABLE_tolua_get_b2Filter_unsigned_categoryBits
static int tolua_get_b2Filter_unsigned_categoryBits(lua_State* tolua_S)
{
  b2Filter* self = (b2Filter*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'categoryBits'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->categoryBits);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: categoryBits of class  b2Filter */
#ifndef TOLUA_DISABLE_tolua_set_b2Filter_unsigned_categoryBits
static int tolua_set_b2Filter_unsigned_categoryBits(lua_State* tolua_S)
{
  b2Filter* self = (b2Filter*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'categoryBits'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->categoryBits = (( unsigned short)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: maskBits of class  b2Filter */
#ifndef TOLUA_DISABLE_tolua_get_b2Filter_unsigned_maskBits
static int tolua_get_b2Filter_unsigned_maskBits(lua_State* tolua_S)
{
  b2Filter* self = (b2Filter*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'maskBits'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->maskBits);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: maskBits of class  b2Filter */
#ifndef TOLUA_DISABLE_tolua_set_b2Filter_unsigned_maskBits
static int tolua_set_b2Filter_unsigned_maskBits(lua_State* tolua_S)
{
  b2Filter* self = (b2Filter*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'maskBits'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->maskBits = (( unsigned short)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: groupIndex of class  b2Filter */
#ifndef TOLUA_DISABLE_tolua_get_b2Filter_groupIndex
static int tolua_get_b2Filter_groupIndex(lua_State* tolua_S)
{
  b2Filter* self = (b2Filter*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'groupIndex'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->groupIndex);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: groupIndex of class  b2Filter */
#ifndef TOLUA_DISABLE_tolua_set_b2Filter_groupIndex
static int tolua_set_b2Filter_groupIndex(lua_State* tolua_S)
{
  b2Filter* self = (b2Filter*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'groupIndex'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->groupIndex = (( signed short)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2FixtureDef_new00
static int tolua_luaBox2D_b2FixtureDef_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2FixtureDef",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2FixtureDef* tolua_ret = (b2FixtureDef*)  Mtolua_new((b2FixtureDef)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2FixtureDef");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2FixtureDef_new00_local
static int tolua_luaBox2D_b2FixtureDef_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2FixtureDef",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2FixtureDef* tolua_ret = (b2FixtureDef*)  Mtolua_new((b2FixtureDef)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2FixtureDef");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* get function: shape of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureDef_shape_ptr
static int tolua_get_b2FixtureDef_shape_ptr(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'shape'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)self->shape,"const b2Shape");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: userData of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureDef_userData
static int tolua_get_b2FixtureDef_userData(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'userData'",NULL);
#endif
  tolua_pushuserdata(tolua_S,(void*)self->userData);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: userData of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureDef_userData
static int tolua_set_b2FixtureDef_userData(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'userData'",NULL);
  if (!tolua_isuserdata(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->userData = ((void*)  tolua_touserdata(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: friction of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureDef_friction
static int tolua_get_b2FixtureDef_friction(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'friction'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->friction);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: friction of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureDef_friction
static int tolua_set_b2FixtureDef_friction(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'friction'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->friction = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: restitution of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureDef_restitution
static int tolua_get_b2FixtureDef_restitution(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'restitution'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->restitution);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: restitution of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureDef_restitution
static int tolua_set_b2FixtureDef_restitution(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'restitution'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->restitution = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: density of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureDef_density
static int tolua_get_b2FixtureDef_density(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'density'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->density);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: density of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureDef_density
static int tolua_set_b2FixtureDef_density(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'density'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->density = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: isSensor of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureDef_isSensor
static int tolua_get_b2FixtureDef_isSensor(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'isSensor'",NULL);
#endif
  tolua_pushboolean(tolua_S,(bool)self->isSensor);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: isSensor of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureDef_isSensor
static int tolua_set_b2FixtureDef_isSensor(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'isSensor'",NULL);
  if (!tolua_isboolean(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->isSensor = ((bool)  tolua_toboolean(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: filter of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureDef_filter
static int tolua_get_b2FixtureDef_filter(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'filter'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->filter,"b2Filter");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: filter of class  b2FixtureDef */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureDef_filter
static int tolua_set_b2FixtureDef_filter(lua_State* tolua_S)
{
  b2FixtureDef* self = (b2FixtureDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'filter'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2Filter",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->filter = *((b2Filter*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: aabb of class  b2FixtureProxy */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureProxy_aabb
static int tolua_get_b2FixtureProxy_aabb(lua_State* tolua_S)
{
  b2FixtureProxy* self = (b2FixtureProxy*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'aabb'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->aabb,"b2AABB");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: aabb of class  b2FixtureProxy */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureProxy_aabb
static int tolua_set_b2FixtureProxy_aabb(lua_State* tolua_S)
{
  b2FixtureProxy* self = (b2FixtureProxy*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'aabb'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2AABB",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->aabb = *((b2AABB*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: fixture of class  b2FixtureProxy */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureProxy_fixture_ptr
static int tolua_get_b2FixtureProxy_fixture_ptr(lua_State* tolua_S)
{
  b2FixtureProxy* self = (b2FixtureProxy*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'fixture'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)self->fixture,"b2Fixture");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: fixture of class  b2FixtureProxy */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureProxy_fixture_ptr
static int tolua_set_b2FixtureProxy_fixture_ptr(lua_State* tolua_S)
{
  b2FixtureProxy* self = (b2FixtureProxy*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'fixture'",NULL);
  if (!tolua_isusertype(tolua_S,2,"b2Fixture",0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->fixture = ((b2Fixture*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: childIndex of class  b2FixtureProxy */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureProxy_childIndex
static int tolua_get_b2FixtureProxy_childIndex(lua_State* tolua_S)
{
  b2FixtureProxy* self = (b2FixtureProxy*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'childIndex'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->childIndex);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: childIndex of class  b2FixtureProxy */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureProxy_childIndex
static int tolua_set_b2FixtureProxy_childIndex(lua_State* tolua_S)
{
  b2FixtureProxy* self = (b2FixtureProxy*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'childIndex'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->childIndex = (( signed int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: proxyId of class  b2FixtureProxy */
#ifndef TOLUA_DISABLE_tolua_get_b2FixtureProxy_proxyId
static int tolua_get_b2FixtureProxy_proxyId(lua_State* tolua_S)
{
  b2FixtureProxy* self = (b2FixtureProxy*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'proxyId'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->proxyId);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: proxyId of class  b2FixtureProxy */
#ifndef TOLUA_DISABLE_tolua_set_b2FixtureProxy_proxyId
static int tolua_set_b2FixtureProxy_proxyId(lua_State* tolua_S)
{
  b2FixtureProxy* self = (b2FixtureProxy*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'proxyId'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->proxyId = (( signed int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetType of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetType00
static int tolua_luaBox2D_b2Fixture_GetType00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetType'", NULL);
#endif
  {
   b2Shape::Type tolua_ret = (b2Shape::Type)  self->GetType();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Shape::Type)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Shape::Type");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Shape::Type));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Shape::Type");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetType'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetShape of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetShape00
static int tolua_luaBox2D_b2Fixture_GetShape00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetShape'", NULL);
#endif
  {
   b2Shape* tolua_ret = (b2Shape*)  self->GetShape();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Shape");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetShape'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetShape of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetShape01
static int tolua_luaBox2D_b2Fixture_GetShape01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetShape'", NULL);
#endif
  {
   const b2Shape* tolua_ret = (const b2Shape*)  self->GetShape();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2Shape");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Fixture_GetShape00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetSensor of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_SetSensor00
static int tolua_luaBox2D_b2Fixture_SetSensor00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
  bool sensor = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSensor'", NULL);
#endif
  {
   self->SetSensor(sensor);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetSensor'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: IsSensor of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_IsSensor00
static int tolua_luaBox2D_b2Fixture_IsSensor00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSensor'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->IsSensor();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IsSensor'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetFilterData of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_SetFilterData00
static int tolua_luaBox2D_b2Fixture_SetFilterData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Filter",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
  const b2Filter* filter = ((const b2Filter*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetFilterData'", NULL);
#endif
  {
   self->SetFilterData(*filter);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetFilterData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetFilterData of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetFilterData00
static int tolua_luaBox2D_b2Fixture_GetFilterData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFilterData'", NULL);
#endif
  {
   const b2Filter& tolua_ret = (const b2Filter&)  self->GetFilterData();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const b2Filter");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetFilterData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Refilter of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_Refilter00
static int tolua_luaBox2D_b2Fixture_Refilter00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Refilter'", NULL);
#endif
  {
   self->Refilter();
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Refilter'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetBody of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetBody00
static int tolua_luaBox2D_b2Fixture_GetBody00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBody'", NULL);
#endif
  {
   b2Body* tolua_ret = (b2Body*)  self->GetBody();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Body");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetBody'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetBody of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetBody01
static int tolua_luaBox2D_b2Fixture_GetBody01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetBody'", NULL);
#endif
  {
   const b2Body* tolua_ret = (const b2Body*)  self->GetBody();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2Body");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Fixture_GetBody00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetNext of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetNext00
static int tolua_luaBox2D_b2Fixture_GetNext00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNext'", NULL);
#endif
  {
   b2Fixture* tolua_ret = (b2Fixture*)  self->GetNext();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Fixture");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetNext'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetNext of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetNext01
static int tolua_luaBox2D_b2Fixture_GetNext01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNext'", NULL);
#endif
  {
   const b2Fixture* tolua_ret = (const b2Fixture*)  self->GetNext();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2Fixture");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Fixture_GetNext00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetUserData of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetUserData00
static int tolua_luaBox2D_b2Fixture_GetUserData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetUserData'", NULL);
#endif
  {
   void* tolua_ret = (void*)  self->GetUserData();
   tolua_pushuserdata(tolua_S,(void*)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetUserData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetUserData of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_SetUserData00
static int tolua_luaBox2D_b2Fixture_SetUserData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
  void* data = ((void*)  tolua_touserdata(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUserData'", NULL);
#endif
  {
   self->SetUserData(data);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetUserData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: TestPoint of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_TestPoint00
static int tolua_luaBox2D_b2Fixture_TestPoint00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* p = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'TestPoint'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->TestPoint(*p);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'TestPoint'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: RayCast of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_RayCast00
static int tolua_luaBox2D_b2Fixture_RayCast00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2RayCastOutput",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2RayCastInput",0,&tolua_err)) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,5,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
  b2RayCastOutput* output = ((b2RayCastOutput*)  tolua_tousertype(tolua_S,2,0));
  const b2RayCastInput* input = ((const b2RayCastInput*)  tolua_tousertype(tolua_S,3,0));
  signed int childIndex = (( signed int)  tolua_tonumber(tolua_S,4,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RayCast'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->RayCast(output,*input,childIndex);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'RayCast'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetMassData of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetMassData00
static int tolua_luaBox2D_b2Fixture_GetMassData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2MassData",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
  b2MassData* massData = ((b2MassData*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMassData'", NULL);
#endif
  {
   self->GetMassData(massData);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetMassData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetDensity of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_SetDensity00
static int tolua_luaBox2D_b2Fixture_SetDensity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
   float density = ((  float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetDensity'", NULL);
#endif
  {
   self->SetDensity(density);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetDensity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetDensity of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetDensity00
static int tolua_luaBox2D_b2Fixture_GetDensity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetDensity'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetDensity();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetDensity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetFriction of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetFriction00
static int tolua_luaBox2D_b2Fixture_GetFriction00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFriction'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetFriction();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetFriction'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetFriction of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_SetFriction00
static int tolua_luaBox2D_b2Fixture_SetFriction00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
   float friction = ((  float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetFriction'", NULL);
#endif
  {
   self->SetFriction(friction);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetFriction'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetRestitution of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetRestitution00
static int tolua_luaBox2D_b2Fixture_GetRestitution00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetRestitution'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetRestitution();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetRestitution'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetRestitution of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_SetRestitution00
static int tolua_luaBox2D_b2Fixture_SetRestitution00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
   float restitution = ((  float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetRestitution'", NULL);
#endif
  {
   self->SetRestitution(restitution);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetRestitution'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetAABB of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_GetAABB00
static int tolua_luaBox2D_b2Fixture_GetAABB00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Fixture",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Fixture* self = (const b2Fixture*)  tolua_tousertype(tolua_S,1,0);
  signed int childIndex = (( signed int)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAABB'", NULL);
#endif
  {
   const b2AABB& tolua_ret = (const b2AABB&)  self->GetAABB(childIndex);
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const b2AABB");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetAABB'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Dump of class  b2Fixture */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Fixture_Dump00
static int tolua_luaBox2D_b2Fixture_Dump00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Fixture",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Fixture* self = (b2Fixture*)  tolua_tousertype(tolua_S,1,0);
  signed int bodyIndex = (( signed int)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Dump'", NULL);
#endif
  {
   self->Dump(bodyIndex);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Dump'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2BodyDef_new00
static int tolua_luaBox2D_b2BodyDef_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2BodyDef",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2BodyDef* tolua_ret = (b2BodyDef*)  Mtolua_new((b2BodyDef)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2BodyDef");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2BodyDef_new00_local
static int tolua_luaBox2D_b2BodyDef_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2BodyDef",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2BodyDef* tolua_ret = (b2BodyDef*)  Mtolua_new((b2BodyDef)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2BodyDef");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* get function: type of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_type
static int tolua_get_b2BodyDef_type(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'type'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->type,"b2BodyType");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: type of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_type
static int tolua_set_b2BodyDef_type(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'type'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2BodyType",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->type = *((b2BodyType*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: position of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_position
static int tolua_get_b2BodyDef_position(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'position'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->position,"b2Vec2");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: position of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_position
static int tolua_set_b2BodyDef_position(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'position'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2Vec2",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->position = *((b2Vec2*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: angle of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_angle
static int tolua_get_b2BodyDef_angle(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'angle'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->angle);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: angle of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_angle
static int tolua_set_b2BodyDef_angle(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'angle'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->angle = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: linearVelocity of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_linearVelocity
static int tolua_get_b2BodyDef_linearVelocity(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'linearVelocity'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->linearVelocity,"b2Vec2");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: linearVelocity of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_linearVelocity
static int tolua_set_b2BodyDef_linearVelocity(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'linearVelocity'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2Vec2",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->linearVelocity = *((b2Vec2*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: angularVelocity of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_angularVelocity
static int tolua_get_b2BodyDef_angularVelocity(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'angularVelocity'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->angularVelocity);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: angularVelocity of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_angularVelocity
static int tolua_set_b2BodyDef_angularVelocity(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'angularVelocity'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->angularVelocity = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: linearDamping of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_linearDamping
static int tolua_get_b2BodyDef_linearDamping(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'linearDamping'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->linearDamping);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: linearDamping of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_linearDamping
static int tolua_set_b2BodyDef_linearDamping(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'linearDamping'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->linearDamping = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: angularDamping of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_angularDamping
static int tolua_get_b2BodyDef_angularDamping(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'angularDamping'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->angularDamping);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: angularDamping of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_angularDamping
static int tolua_set_b2BodyDef_angularDamping(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'angularDamping'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->angularDamping = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: allowSleep of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_allowSleep
static int tolua_get_b2BodyDef_allowSleep(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'allowSleep'",NULL);
#endif
  tolua_pushboolean(tolua_S,(bool)self->allowSleep);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: allowSleep of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_allowSleep
static int tolua_set_b2BodyDef_allowSleep(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'allowSleep'",NULL);
  if (!tolua_isboolean(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->allowSleep = ((bool)  tolua_toboolean(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: awake of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_awake
static int tolua_get_b2BodyDef_awake(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'awake'",NULL);
#endif
  tolua_pushboolean(tolua_S,(bool)self->awake);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: awake of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_awake
static int tolua_set_b2BodyDef_awake(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'awake'",NULL);
  if (!tolua_isboolean(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->awake = ((bool)  tolua_toboolean(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: fixedRotation of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_fixedRotation
static int tolua_get_b2BodyDef_fixedRotation(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'fixedRotation'",NULL);
#endif
  tolua_pushboolean(tolua_S,(bool)self->fixedRotation);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: fixedRotation of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_fixedRotation
static int tolua_set_b2BodyDef_fixedRotation(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'fixedRotation'",NULL);
  if (!tolua_isboolean(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->fixedRotation = ((bool)  tolua_toboolean(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: bullet of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_bullet
static int tolua_get_b2BodyDef_bullet(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bullet'",NULL);
#endif
  tolua_pushboolean(tolua_S,(bool)self->bullet);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: bullet of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_bullet
static int tolua_set_b2BodyDef_bullet(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'bullet'",NULL);
  if (!tolua_isboolean(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->bullet = ((bool)  tolua_toboolean(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: active of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_active
static int tolua_get_b2BodyDef_active(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'active'",NULL);
#endif
  tolua_pushboolean(tolua_S,(bool)self->active);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: active of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_active
static int tolua_set_b2BodyDef_active(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'active'",NULL);
  if (!tolua_isboolean(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->active = ((bool)  tolua_toboolean(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: userData of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_userData
static int tolua_get_b2BodyDef_userData(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'userData'",NULL);
#endif
  tolua_pushuserdata(tolua_S,(void*)self->userData);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: userData of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_userData
static int tolua_set_b2BodyDef_userData(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'userData'",NULL);
  if (!tolua_isuserdata(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->userData = ((void*)  tolua_touserdata(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: gravityScale of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_get_b2BodyDef_gravityScale
static int tolua_get_b2BodyDef_gravityScale(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'gravityScale'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->gravityScale);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: gravityScale of class  b2BodyDef */
#ifndef TOLUA_DISABLE_tolua_set_b2BodyDef_gravityScale
static int tolua_set_b2BodyDef_gravityScale(lua_State* tolua_S)
{
  b2BodyDef* self = (b2BodyDef*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'gravityScale'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->gravityScale = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* method: CreateFixture of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_CreateFixture00
static int tolua_luaBox2D_b2Body_CreateFixture00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2FixtureDef",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2FixtureDef* def = ((const b2FixtureDef*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CreateFixture'", NULL);
#endif
  {
   b2Fixture* tolua_ret = (b2Fixture*)  self->CreateFixture(def);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Fixture");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'CreateFixture'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: CreateFixture of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_CreateFixture01
static int tolua_luaBox2D_b2Body_CreateFixture01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2Shape",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Shape* shape = ((const b2Shape*)  tolua_tousertype(tolua_S,2,0));
   float density = ((  float)  tolua_tonumber(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'CreateFixture'", NULL);
#endif
  {
   b2Fixture* tolua_ret = (b2Fixture*)  self->CreateFixture(shape,density);
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Fixture");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Body_CreateFixture00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: DestroyFixture of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_DestroyFixture00
static int tolua_luaBox2D_b2Body_DestroyFixture00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  b2Fixture* fixture = ((b2Fixture*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'DestroyFixture'", NULL);
#endif
  {
   self->DestroyFixture(fixture);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'DestroyFixture'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetTransform of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetTransform00
static int tolua_luaBox2D_b2Body_SetTransform00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* position = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
   float angle = ((  float)  tolua_tonumber(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetTransform'", NULL);
#endif
  {
   self->SetTransform(*position,angle);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetTransform'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetTransform of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetTransform00
static int tolua_luaBox2D_b2Body_GetTransform00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetTransform'", NULL);
#endif
  {
   const b2Transform& tolua_ret = (const b2Transform&)  self->GetTransform();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const b2Transform");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetTransform'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetPosition of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetPosition00
static int tolua_luaBox2D_b2Body_GetPosition00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPosition'", NULL);
#endif
  {
   const b2Vec2& tolua_ret = (const b2Vec2&)  self->GetPosition();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const b2Vec2");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetPosition'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetAngle of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetAngle00
static int tolua_luaBox2D_b2Body_GetAngle00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAngle'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetAngle();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetAngle'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetWorldCenter of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetWorldCenter00
static int tolua_luaBox2D_b2Body_GetWorldCenter00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorldCenter'", NULL);
#endif
  {
   const b2Vec2& tolua_ret = (const b2Vec2&)  self->GetWorldCenter();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const b2Vec2");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetWorldCenter'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetLocalCenter of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetLocalCenter00
static int tolua_luaBox2D_b2Body_GetLocalCenter00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLocalCenter'", NULL);
#endif
  {
   const b2Vec2& tolua_ret = (const b2Vec2&)  self->GetLocalCenter();
    tolua_pushusertype(tolua_S,(void*)&tolua_ret,"const b2Vec2");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetLocalCenter'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetLinearVelocity of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetLinearVelocity00
static int tolua_luaBox2D_b2Body_SetLinearVelocity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* v = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLinearVelocity'", NULL);
#endif
  {
   self->SetLinearVelocity(*v);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetLinearVelocity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetLinearVelocity of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetLinearVelocity00
static int tolua_luaBox2D_b2Body_GetLinearVelocity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLinearVelocity'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetLinearVelocity();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetLinearVelocity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetAngularVelocity of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetAngularVelocity00
static int tolua_luaBox2D_b2Body_SetAngularVelocity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
   float omega = ((  float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAngularVelocity'", NULL);
#endif
  {
   self->SetAngularVelocity(omega);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetAngularVelocity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetAngularVelocity of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetAngularVelocity00
static int tolua_luaBox2D_b2Body_GetAngularVelocity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAngularVelocity'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetAngularVelocity();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetAngularVelocity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: ApplyForce of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_ApplyForce00
static int tolua_luaBox2D_b2Body_ApplyForce00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* force = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
  const b2Vec2* point = ((const b2Vec2*)  tolua_tousertype(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyForce'", NULL);
#endif
  {
   self->ApplyForce(*force,*point);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'ApplyForce'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: ApplyForceToCenter of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_ApplyForceToCenter00
static int tolua_luaBox2D_b2Body_ApplyForceToCenter00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* force = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyForceToCenter'", NULL);
#endif
  {
   self->ApplyForceToCenter(*force);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'ApplyForceToCenter'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: ApplyTorque of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_ApplyTorque00
static int tolua_luaBox2D_b2Body_ApplyTorque00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
   float torque = ((  float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyTorque'", NULL);
#endif
  {
   self->ApplyTorque(torque);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'ApplyTorque'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: ApplyLinearImpulse of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_ApplyLinearImpulse00
static int tolua_luaBox2D_b2Body_ApplyLinearImpulse00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* impulse = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
  const b2Vec2* point = ((const b2Vec2*)  tolua_tousertype(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyLinearImpulse'", NULL);
#endif
  {
   self->ApplyLinearImpulse(*impulse,*point);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'ApplyLinearImpulse'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: ApplyAngularImpulse of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_ApplyAngularImpulse00
static int tolua_luaBox2D_b2Body_ApplyAngularImpulse00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
   float impulse = ((  float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ApplyAngularImpulse'", NULL);
#endif
  {
   self->ApplyAngularImpulse(impulse);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'ApplyAngularImpulse'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetMass of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetMass00
static int tolua_luaBox2D_b2Body_GetMass00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMass'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetMass();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetMass'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetInertia of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetInertia00
static int tolua_luaBox2D_b2Body_GetInertia00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetInertia'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetInertia();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetInertia'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetMassData of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetMassData00
static int tolua_luaBox2D_b2Body_GetMassData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2MassData",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
  b2MassData* data = ((b2MassData*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetMassData'", NULL);
#endif
  {
   self->GetMassData(data);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetMassData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetMassData of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetMassData00
static int tolua_luaBox2D_b2Body_SetMassData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2MassData",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2MassData* data = ((const b2MassData*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetMassData'", NULL);
#endif
  {
   self->SetMassData(data);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetMassData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: ResetMassData of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_ResetMassData00
static int tolua_luaBox2D_b2Body_ResetMassData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ResetMassData'", NULL);
#endif
  {
   self->ResetMassData();
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'ResetMassData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetWorldPoint of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetWorldPoint00
static int tolua_luaBox2D_b2Body_GetWorldPoint00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* localPoint = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorldPoint'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetWorldPoint(*localPoint);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetWorldPoint'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetWorldVector of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetWorldVector00
static int tolua_luaBox2D_b2Body_GetWorldVector00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* localVector = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorldVector'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetWorldVector(*localVector);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetWorldVector'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetLocalPoint of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetLocalPoint00
static int tolua_luaBox2D_b2Body_GetLocalPoint00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* worldPoint = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLocalPoint'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetLocalPoint(*worldPoint);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetLocalPoint'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetLocalVector of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetLocalVector00
static int tolua_luaBox2D_b2Body_GetLocalVector00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* worldVector = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLocalVector'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetLocalVector(*worldVector);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetLocalVector'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetLinearVelocityFromWorldPoint of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetLinearVelocityFromWorldPoint00
static int tolua_luaBox2D_b2Body_GetLinearVelocityFromWorldPoint00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* worldPoint = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLinearVelocityFromWorldPoint'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetLinearVelocityFromWorldPoint(*worldPoint);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetLinearVelocityFromWorldPoint'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetLinearVelocityFromLocalPoint of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetLinearVelocityFromLocalPoint00
static int tolua_luaBox2D_b2Body_GetLinearVelocityFromLocalPoint00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* localPoint = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLinearVelocityFromLocalPoint'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetLinearVelocityFromLocalPoint(*localPoint);
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetLinearVelocityFromLocalPoint'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetLinearDamping of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetLinearDamping00
static int tolua_luaBox2D_b2Body_GetLinearDamping00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetLinearDamping'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetLinearDamping();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetLinearDamping'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetLinearDamping of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetLinearDamping00
static int tolua_luaBox2D_b2Body_SetLinearDamping00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
   float linearDamping = ((  float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetLinearDamping'", NULL);
#endif
  {
   self->SetLinearDamping(linearDamping);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetLinearDamping'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetAngularDamping of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetAngularDamping00
static int tolua_luaBox2D_b2Body_GetAngularDamping00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetAngularDamping'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetAngularDamping();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetAngularDamping'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetAngularDamping of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetAngularDamping00
static int tolua_luaBox2D_b2Body_SetAngularDamping00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
   float angularDamping = ((  float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAngularDamping'", NULL);
#endif
  {
   self->SetAngularDamping(angularDamping);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetAngularDamping'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetGravityScale of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetGravityScale00
static int tolua_luaBox2D_b2Body_GetGravityScale00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetGravityScale'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetGravityScale();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetGravityScale'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetGravityScale of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetGravityScale00
static int tolua_luaBox2D_b2Body_SetGravityScale00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
   float scale = ((  float)  tolua_tonumber(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetGravityScale'", NULL);
#endif
  {
   self->SetGravityScale(scale);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetGravityScale'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetType of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetType00
static int tolua_luaBox2D_b2Body_SetType00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2BodyType",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  b2BodyType type = *((b2BodyType*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetType'", NULL);
#endif
  {
   self->SetType(type);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetType'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetType of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetType00
static int tolua_luaBox2D_b2Body_GetType00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetType'", NULL);
#endif
  {
   b2BodyType tolua_ret = (b2BodyType)  self->GetType();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2BodyType)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2BodyType");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2BodyType));
     tolua_pushusertype(tolua_S,tolua_obj,"b2BodyType");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetType'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetBullet of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetBullet00
static int tolua_luaBox2D_b2Body_SetBullet00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetBullet'", NULL);
#endif
  {
   self->SetBullet(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetBullet'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: IsBullet of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_IsBullet00
static int tolua_luaBox2D_b2Body_IsBullet00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsBullet'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->IsBullet();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IsBullet'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetSleepingAllowed of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetSleepingAllowed00
static int tolua_luaBox2D_b2Body_SetSleepingAllowed00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetSleepingAllowed'", NULL);
#endif
  {
   self->SetSleepingAllowed(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetSleepingAllowed'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: IsSleepingAllowed of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_IsSleepingAllowed00
static int tolua_luaBox2D_b2Body_IsSleepingAllowed00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsSleepingAllowed'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->IsSleepingAllowed();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IsSleepingAllowed'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetAwake of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetAwake00
static int tolua_luaBox2D_b2Body_SetAwake00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetAwake'", NULL);
#endif
  {
   self->SetAwake(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetAwake'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: IsAwake of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_IsAwake00
static int tolua_luaBox2D_b2Body_IsAwake00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsAwake'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->IsAwake();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IsAwake'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetActive of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetActive00
static int tolua_luaBox2D_b2Body_SetActive00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetActive'", NULL);
#endif
  {
   self->SetActive(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetActive'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: IsActive of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_IsActive00
static int tolua_luaBox2D_b2Body_IsActive00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsActive'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->IsActive();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IsActive'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetFixedRotation of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetFixedRotation00
static int tolua_luaBox2D_b2Body_SetFixedRotation00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isboolean(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  bool flag = ((bool)  tolua_toboolean(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetFixedRotation'", NULL);
#endif
  {
   self->SetFixedRotation(flag);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetFixedRotation'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: IsFixedRotation of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_IsFixedRotation00
static int tolua_luaBox2D_b2Body_IsFixedRotation00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsFixedRotation'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->IsFixedRotation();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IsFixedRotation'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetFixtureList of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetFixtureList00
static int tolua_luaBox2D_b2Body_GetFixtureList00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFixtureList'", NULL);
#endif
  {
   b2Fixture* tolua_ret = (b2Fixture*)  self->GetFixtureList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Fixture");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetFixtureList'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetFixtureList of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetFixtureList01
static int tolua_luaBox2D_b2Body_GetFixtureList01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetFixtureList'", NULL);
#endif
  {
   const b2Fixture* tolua_ret = (const b2Fixture*)  self->GetFixtureList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2Fixture");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Body_GetFixtureList00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetJointList of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetJointList00
static int tolua_luaBox2D_b2Body_GetJointList00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetJointList'", NULL);
#endif
  {
   b2JointEdge* tolua_ret = (b2JointEdge*)  self->GetJointList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2JointEdge");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetJointList'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetJointList of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetJointList01
static int tolua_luaBox2D_b2Body_GetJointList01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetJointList'", NULL);
#endif
  {
   const b2JointEdge* tolua_ret = (const b2JointEdge*)  self->GetJointList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2JointEdge");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Body_GetJointList00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetContactList of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetContactList00
static int tolua_luaBox2D_b2Body_GetContactList00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContactList'", NULL);
#endif
  {
   b2ContactEdge* tolua_ret = (b2ContactEdge*)  self->GetContactList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2ContactEdge");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetContactList'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetContactList of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetContactList01
static int tolua_luaBox2D_b2Body_GetContactList01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetContactList'", NULL);
#endif
  {
   const b2ContactEdge* tolua_ret = (const b2ContactEdge*)  self->GetContactList();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2ContactEdge");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Body_GetContactList00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetNext of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetNext00
static int tolua_luaBox2D_b2Body_GetNext00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNext'", NULL);
#endif
  {
   b2Body* tolua_ret = (b2Body*)  self->GetNext();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Body");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetNext'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetNext of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetNext01
static int tolua_luaBox2D_b2Body_GetNext01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetNext'", NULL);
#endif
  {
   const b2Body* tolua_ret = (const b2Body*)  self->GetNext();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2Body");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Body_GetNext00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetUserData of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetUserData00
static int tolua_luaBox2D_b2Body_GetUserData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetUserData'", NULL);
#endif
  {
   void* tolua_ret = (void*)  self->GetUserData();
   tolua_pushuserdata(tolua_S,(void*)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetUserData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetUserData of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_SetUserData00
static int tolua_luaBox2D_b2Body_SetUserData00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isuserdata(tolua_S,2,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
  void* data = ((void*)  tolua_touserdata(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetUserData'", NULL);
#endif
  {
   self->SetUserData(data);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetUserData'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetWorld of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetWorld00
static int tolua_luaBox2D_b2Body_GetWorld00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorld'", NULL);
#endif
  {
   b2World* tolua_ret = (b2World*)  self->GetWorld();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2World");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetWorld'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetWorld of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_GetWorld01
static int tolua_luaBox2D_b2Body_GetWorld01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Body* self = (const b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetWorld'", NULL);
#endif
  {
   const b2World* tolua_ret = (const b2World*)  self->GetWorld();
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"const b2World");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Body_GetWorld00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: Dump of class  b2Body */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Body_Dump00
static int tolua_luaBox2D_b2Body_Dump00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Body",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Body* self = (b2Body*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Dump'", NULL);
#endif
  {
   self->Dump();
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Dump'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_new00
static int tolua_luaBox2D_b2Vec2_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Vec2",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2Vec2* tolua_ret = (b2Vec2*)  Mtolua_new((b2Vec2)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Vec2");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_new00_local
static int tolua_luaBox2D_b2Vec2_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Vec2",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2Vec2* tolua_ret = (b2Vec2*)  Mtolua_new((b2Vec2)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_new01
static int tolua_luaBox2D_b2Vec2_new01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Vec2",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
   float x = ((  float)  tolua_tonumber(tolua_S,2,0));
   float y = ((  float)  tolua_tonumber(tolua_S,3,0));
  {
   b2Vec2* tolua_ret = (b2Vec2*)  Mtolua_new((b2Vec2)(x,y));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Vec2");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Vec2_new00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_new01_local
static int tolua_luaBox2D_b2Vec2_new01_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Vec2",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
   float x = ((  float)  tolua_tonumber(tolua_S,2,0));
   float y = ((  float)  tolua_tonumber(tolua_S,3,0));
  {
   b2Vec2* tolua_ret = (b2Vec2*)  Mtolua_new((b2Vec2)(x,y));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Vec2_new00_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetZero of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_SetZero00
static int tolua_luaBox2D_b2Vec2_SetZero00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Vec2",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Vec2* self = (b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetZero'", NULL);
#endif
  {
   self->SetZero();
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetZero'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Set of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_Set00
static int tolua_luaBox2D_b2Vec2_Set00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Vec2",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Vec2* self = (b2Vec2*)  tolua_tousertype(tolua_S,1,0);
   float x_ = ((  float)  tolua_tonumber(tolua_S,2,0));
   float y_ = ((  float)  tolua_tonumber(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Set'", NULL);
#endif
  {
   self->Set(x_,y_);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Set'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Length of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_Length00
static int tolua_luaBox2D_b2Vec2_Length00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Vec2",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Vec2* self = (const b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Length'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->Length();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Length'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: LengthSquared of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_LengthSquared00
static int tolua_luaBox2D_b2Vec2_LengthSquared00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Vec2",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Vec2* self = (const b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'LengthSquared'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->LengthSquared();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'LengthSquared'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Normalize of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_Normalize00
static int tolua_luaBox2D_b2Vec2_Normalize00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Vec2",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Vec2* self = (b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Normalize'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->Normalize();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Normalize'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: IsValid of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_IsValid00
static int tolua_luaBox2D_b2Vec2_IsValid00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Vec2",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Vec2* self = (const b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsValid'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->IsValid();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IsValid'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Skew of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Vec2_Skew00
static int tolua_luaBox2D_b2Vec2_Skew00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Vec2",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Vec2* self = (const b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Skew'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->Skew();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Skew'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* get function: x of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_get_b2Vec2_x
static int tolua_get_b2Vec2_x(lua_State* tolua_S)
{
  b2Vec2* self = (b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->x);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: x of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_set_b2Vec2_x
static int tolua_set_b2Vec2_x(lua_State* tolua_S)
{
  b2Vec2* self = (b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'x'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->x = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: y of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_get_b2Vec2_y
static int tolua_get_b2Vec2_y(lua_State* tolua_S)
{
  b2Vec2* self = (b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->y);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: y of class  b2Vec2 */
#ifndef TOLUA_DISABLE_tolua_set_b2Vec2_y
static int tolua_set_b2Vec2_y(lua_State* tolua_S)
{
  b2Vec2* self = (b2Vec2*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'y'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->y = ((  float)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Transform_new00
static int tolua_luaBox2D_b2Transform_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Transform",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2Transform* tolua_ret = (b2Transform*)  Mtolua_new((b2Transform)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Transform");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Transform_new00_local
static int tolua_luaBox2D_b2Transform_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Transform",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2Transform* tolua_ret = (b2Transform*)  Mtolua_new((b2Transform)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Transform");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Transform_new01
static int tolua_luaBox2D_b2Transform_new01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Transform",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Rot",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Vec2* position = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
  const b2Rot* rotation = ((const b2Rot*)  tolua_tousertype(tolua_S,3,0));
  {
   b2Transform* tolua_ret = (b2Transform*)  Mtolua_new((b2Transform)(*position,*rotation));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Transform");
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Transform_new00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Transform_new01_local
static int tolua_luaBox2D_b2Transform_new01_local(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2Transform",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Rot",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2Vec2* position = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
  const b2Rot* rotation = ((const b2Rot*)  tolua_tousertype(tolua_S,3,0));
  {
   b2Transform* tolua_ret = (b2Transform*)  Mtolua_new((b2Transform)(*position,*rotation));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2Transform");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2Transform_new00_local(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: SetIdentity of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Transform_SetIdentity00
static int tolua_luaBox2D_b2Transform_SetIdentity00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Transform",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Transform* self = (b2Transform*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'SetIdentity'", NULL);
#endif
  {
   self->SetIdentity();
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'SetIdentity'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Set of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2Transform_Set00
static int tolua_luaBox2D_b2Transform_Set00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Transform",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnumber(tolua_S,3,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Transform* self = (b2Transform*)  tolua_tousertype(tolua_S,1,0);
  const b2Vec2* position = ((const b2Vec2*)  tolua_tousertype(tolua_S,2,0));
   float angle = ((  float)  tolua_tonumber(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Set'", NULL);
#endif
  {
   self->Set(*position,angle);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Set'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* get function: p of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_get_b2Transform_p
static int tolua_get_b2Transform_p(lua_State* tolua_S)
{
  b2Transform* self = (b2Transform*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'p'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->p,"b2Vec2");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: p of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_set_b2Transform_p
static int tolua_set_b2Transform_p(lua_State* tolua_S)
{
  b2Transform* self = (b2Transform*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'p'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2Vec2",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->p = *((b2Vec2*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: q of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_get_b2Transform_q
static int tolua_get_b2Transform_q(lua_State* tolua_S)
{
  b2Transform* self = (b2Transform*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'q'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->q,"b2Rot");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: q of class  b2Transform */
#ifndef TOLUA_DISABLE_tolua_set_b2Transform_q
static int tolua_set_b2Transform_q(lua_State* tolua_S)
{
  b2Transform* self = (b2Transform*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'q'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2Rot",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->q = *((b2Rot*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  QueryCallback */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_QueryCallback_new00
static int tolua_luaBox2D_QueryCallback_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QueryCallback",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isfunction(tolua_S,2,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  int nHandler = (tolua_ref_function(tolua_S,2,0));
  {
   QueryCallback* tolua_ret = (QueryCallback*)  Mtolua_new((QueryCallback)(nHandler));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QueryCallback");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  QueryCallback */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_QueryCallback_new00_local
static int tolua_luaBox2D_QueryCallback_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"QueryCallback",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isfunction(tolua_S,2,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  int nHandler = (tolua_ref_function(tolua_S,2,0));
  {
   QueryCallback* tolua_ret = (QueryCallback*)  Mtolua_new((QueryCallback)(nHandler));
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"QueryCallback");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: delete of class  QueryCallback */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_QueryCallback_delete00
static int tolua_luaBox2D_QueryCallback_delete00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QueryCallback",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QueryCallback* self = (QueryCallback*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'delete'", NULL);
#endif
  Mtolua_delete(self);
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'delete'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: ReportFixture of class  QueryCallback */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_QueryCallback_ReportFixture00
static int tolua_luaBox2D_QueryCallback_ReportFixture00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"QueryCallback",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2Fixture",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  QueryCallback* self = (QueryCallback*)  tolua_tousertype(tolua_S,1,0);
  b2Fixture* fixture = ((b2Fixture*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'ReportFixture'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->ReportFixture(fixture);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'ReportFixture'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* get function: indexA of class  b2ContactFeature */
#ifndef TOLUA_DISABLE_tolua_get_b2ContactFeature_unsigned_indexA
static int tolua_get_b2ContactFeature_unsigned_indexA(lua_State* tolua_S)
{
  b2ContactFeature* self = (b2ContactFeature*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'indexA'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->indexA);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: indexA of class  b2ContactFeature */
#ifndef TOLUA_DISABLE_tolua_set_b2ContactFeature_unsigned_indexA
static int tolua_set_b2ContactFeature_unsigned_indexA(lua_State* tolua_S)
{
  b2ContactFeature* self = (b2ContactFeature*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'indexA'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->indexA = (( unsigned char)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: indexB of class  b2ContactFeature */
#ifndef TOLUA_DISABLE_tolua_get_b2ContactFeature_unsigned_indexB
static int tolua_get_b2ContactFeature_unsigned_indexB(lua_State* tolua_S)
{
  b2ContactFeature* self = (b2ContactFeature*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'indexB'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->indexB);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: indexB of class  b2ContactFeature */
#ifndef TOLUA_DISABLE_tolua_set_b2ContactFeature_unsigned_indexB
static int tolua_set_b2ContactFeature_unsigned_indexB(lua_State* tolua_S)
{
  b2ContactFeature* self = (b2ContactFeature*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'indexB'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->indexB = (( unsigned char)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: typeA of class  b2ContactFeature */
#ifndef TOLUA_DISABLE_tolua_get_b2ContactFeature_unsigned_typeA
static int tolua_get_b2ContactFeature_unsigned_typeA(lua_State* tolua_S)
{
  b2ContactFeature* self = (b2ContactFeature*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'typeA'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->typeA);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: typeA of class  b2ContactFeature */
#ifndef TOLUA_DISABLE_tolua_set_b2ContactFeature_unsigned_typeA
static int tolua_set_b2ContactFeature_unsigned_typeA(lua_State* tolua_S)
{
  b2ContactFeature* self = (b2ContactFeature*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'typeA'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->typeA = (( unsigned char)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: typeB of class  b2ContactFeature */
#ifndef TOLUA_DISABLE_tolua_get_b2ContactFeature_unsigned_typeB
static int tolua_get_b2ContactFeature_unsigned_typeB(lua_State* tolua_S)
{
  b2ContactFeature* self = (b2ContactFeature*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'typeB'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->typeB);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: typeB of class  b2ContactFeature */
#ifndef TOLUA_DISABLE_tolua_set_b2ContactFeature_unsigned_typeB
static int tolua_set_b2ContactFeature_unsigned_typeB(lua_State* tolua_S)
{
  b2ContactFeature* self = (b2ContactFeature*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'typeB'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->typeB = (( unsigned char)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: cf of class  b2ContactID */
#ifndef TOLUA_DISABLE_tolua_get_b2ContactID_cf
static int tolua_get_b2ContactID_cf(lua_State* tolua_S)
{
  b2ContactID* self = (b2ContactID*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'cf'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->cf,"b2ContactFeature");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: cf of class  b2ContactID */
#ifndef TOLUA_DISABLE_tolua_set_b2ContactID_cf
static int tolua_set_b2ContactID_cf(lua_State* tolua_S)
{
  b2ContactID* self = (b2ContactID*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'cf'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2ContactFeature",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->cf = *((b2ContactFeature*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: key of class  b2ContactID */
#ifndef TOLUA_DISABLE_tolua_get_b2ContactID_unsigned_key
static int tolua_get_b2ContactID_unsigned_key(lua_State* tolua_S)
{
  b2ContactID* self = (b2ContactID*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'key'",NULL);
#endif
  tolua_pushnumber(tolua_S,(lua_Number)self->key);
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: key of class  b2ContactID */
#ifndef TOLUA_DISABLE_tolua_set_b2ContactID_unsigned_key
static int tolua_set_b2ContactID_unsigned_key(lua_State* tolua_S)
{
  b2ContactID* self = (b2ContactID*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'key'",NULL);
  if (!tolua_isnumber(tolua_S,2,0,&tolua_err))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->key = (( unsigned int)  tolua_tonumber(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: v of class  b2ClipVertex */
#ifndef TOLUA_DISABLE_tolua_get_b2ClipVertex_v
static int tolua_get_b2ClipVertex_v(lua_State* tolua_S)
{
  b2ClipVertex* self = (b2ClipVertex*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'v'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->v,"b2Vec2");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: v of class  b2ClipVertex */
#ifndef TOLUA_DISABLE_tolua_set_b2ClipVertex_v
static int tolua_set_b2ClipVertex_v(lua_State* tolua_S)
{
  b2ClipVertex* self = (b2ClipVertex*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'v'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2Vec2",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->v = *((b2Vec2*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: id of class  b2ClipVertex */
#ifndef TOLUA_DISABLE_tolua_get_b2ClipVertex_id
static int tolua_get_b2ClipVertex_id(lua_State* tolua_S)
{
  b2ClipVertex* self = (b2ClipVertex*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->id,"b2ContactID");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: id of class  b2ClipVertex */
#ifndef TOLUA_DISABLE_tolua_set_b2ClipVertex_id
static int tolua_set_b2ClipVertex_id(lua_State* tolua_S)
{
  b2ClipVertex* self = (b2ClipVertex*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'id'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2ContactID",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->id = *((b2ContactID*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* method: new of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_new00
static int tolua_luaBox2D_b2AABB_new00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2AABB",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2AABB* tolua_ret = (b2AABB*)  Mtolua_new((b2AABB)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2AABB");
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: new_local of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_new00_local
static int tolua_luaBox2D_b2AABB_new00_local(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertable(tolua_S,1,"b2AABB",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  {
   b2AABB* tolua_ret = (b2AABB*)  Mtolua_new((b2AABB)());
    tolua_pushusertype(tolua_S,(void*)tolua_ret,"b2AABB");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'new'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: IsValid of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_IsValid00
static int tolua_luaBox2D_b2AABB_IsValid00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2AABB",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2AABB* self = (const b2AABB*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'IsValid'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->IsValid();
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'IsValid'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetCenter of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_GetCenter00
static int tolua_luaBox2D_b2AABB_GetCenter00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2AABB",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2AABB* self = (const b2AABB*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetCenter'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetCenter();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetCenter'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetExtents of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_GetExtents00
static int tolua_luaBox2D_b2AABB_GetExtents00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2AABB",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2AABB* self = (const b2AABB*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetExtents'", NULL);
#endif
  {
   b2Vec2 tolua_ret = (b2Vec2)  self->GetExtents();
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2Vec2)(tolua_ret));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)&tolua_ret,sizeof(b2Vec2));
     tolua_pushusertype(tolua_S,tolua_obj,"b2Vec2");
    tolua_register_gc(tolua_S,lua_gettop(tolua_S));
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetExtents'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: GetPerimeter of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_GetPerimeter00
static int tolua_luaBox2D_b2AABB_GetPerimeter00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2AABB",0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,2,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2AABB* self = (const b2AABB*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'GetPerimeter'", NULL);
#endif
  {
    float tolua_ret = (  float)  self->GetPerimeter();
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'GetPerimeter'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Combine of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_Combine00
static int tolua_luaBox2D_b2AABB_Combine00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2AABB",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2AABB",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2AABB* self = (b2AABB*)  tolua_tousertype(tolua_S,1,0);
  const b2AABB* aabb = ((const b2AABB*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Combine'", NULL);
#endif
  {
   self->Combine(*aabb);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Combine'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: Combine of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_Combine01
static int tolua_luaBox2D_b2AABB_Combine01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2AABB",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2AABB",0,&tolua_err)) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2AABB",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  b2AABB* self = (b2AABB*)  tolua_tousertype(tolua_S,1,0);
  const b2AABB* aabb1 = ((const b2AABB*)  tolua_tousertype(tolua_S,2,0));
  const b2AABB* aabb2 = ((const b2AABB*)  tolua_tousertype(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Combine'", NULL);
#endif
  {
   self->Combine(*aabb1,*aabb2);
  }
 }
 return 0;
tolua_lerror:
 return tolua_luaBox2D_b2AABB_Combine00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* method: Contains of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_Contains00
static int tolua_luaBox2D_b2AABB_Contains00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2AABB",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2AABB",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2AABB* self = (const b2AABB*)  tolua_tousertype(tolua_S,1,0);
  const b2AABB* aabb = ((const b2AABB*)  tolua_tousertype(tolua_S,2,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'Contains'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->Contains(*aabb);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'Contains'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* method: RayCast of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2AABB_RayCast00
static int tolua_luaBox2D_b2AABB_RayCast00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2AABB",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"b2RayCastOutput",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2RayCastInput",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,4,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2AABB* self = (const b2AABB*)  tolua_tousertype(tolua_S,1,0);
  b2RayCastOutput* output = ((b2RayCastOutput*)  tolua_tousertype(tolua_S,2,0));
  const b2RayCastInput* input = ((const b2RayCastInput*)  tolua_tousertype(tolua_S,3,0));
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in function 'RayCast'", NULL);
#endif
  {
   bool tolua_ret = (bool)  self->RayCast(output,*input);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'RayCast'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* get function: lowerBound of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_get_b2AABB_lowerBound
static int tolua_get_b2AABB_lowerBound(lua_State* tolua_S)
{
  b2AABB* self = (b2AABB*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'lowerBound'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->lowerBound,"b2Vec2");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: lowerBound of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_set_b2AABB_lowerBound
static int tolua_set_b2AABB_lowerBound(lua_State* tolua_S)
{
  b2AABB* self = (b2AABB*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'lowerBound'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2Vec2",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->lowerBound = *((b2Vec2*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* get function: upperBound of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_get_b2AABB_upperBound
static int tolua_get_b2AABB_upperBound(lua_State* tolua_S)
{
  b2AABB* self = (b2AABB*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'upperBound'",NULL);
#endif
   tolua_pushusertype(tolua_S,(void*)&self->upperBound,"b2Vec2");
 return 1;
}
#endif //#ifndef TOLUA_DISABLE

/* set function: upperBound of class  b2AABB */
#ifndef TOLUA_DISABLE_tolua_set_b2AABB_upperBound
static int tolua_set_b2AABB_upperBound(lua_State* tolua_S)
{
  b2AABB* self = (b2AABB*)  tolua_tousertype(tolua_S,1,0);
#ifndef TOLUA_RELEASE
  tolua_Error tolua_err;
  if (!self) tolua_error(tolua_S,"invalid 'self' in accessing variable 'upperBound'",NULL);
  if ((tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"b2Vec2",0,&tolua_err)))
   tolua_error(tolua_S,"#vinvalid type in variable assignment.",&tolua_err);
#endif
  self->upperBound = *((b2Vec2*)  tolua_tousertype(tolua_S,2,0))
;
 return 0;
}
#endif //#ifndef TOLUA_DISABLE

/* function: b2CollideCircles */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2CollideCircles00
static int tolua_luaBox2D_b2CollideCircles00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Manifold",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2CircleShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Transform",0,&tolua_err)) ||
     !tolua_isusertype(tolua_S,4,"const b2CircleShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const b2Transform",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Manifold* manifold = ((b2Manifold*)  tolua_tousertype(tolua_S,1,0));
  const b2CircleShape* circleA = ((const b2CircleShape*)  tolua_tousertype(tolua_S,2,0));
  const b2Transform* xfA = ((const b2Transform*)  tolua_tousertype(tolua_S,3,0));
  const b2CircleShape* circleB = ((const b2CircleShape*)  tolua_tousertype(tolua_S,4,0));
  const b2Transform* xfB = ((const b2Transform*)  tolua_tousertype(tolua_S,5,0));
  {
   b2CollideCircles(manifold,circleA,*xfA,circleB,*xfB);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'b2CollideCircles'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: b2CollidePolygonAndCircle */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2CollidePolygonAndCircle00
static int tolua_luaBox2D_b2CollidePolygonAndCircle00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Manifold",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2PolygonShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Transform",0,&tolua_err)) ||
     !tolua_isusertype(tolua_S,4,"const b2CircleShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const b2Transform",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Manifold* manifold = ((b2Manifold*)  tolua_tousertype(tolua_S,1,0));
  const b2PolygonShape* polygonA = ((const b2PolygonShape*)  tolua_tousertype(tolua_S,2,0));
  const b2Transform* xfA = ((const b2Transform*)  tolua_tousertype(tolua_S,3,0));
  const b2CircleShape* circleB = ((const b2CircleShape*)  tolua_tousertype(tolua_S,4,0));
  const b2Transform* xfB = ((const b2Transform*)  tolua_tousertype(tolua_S,5,0));
  {
   b2CollidePolygonAndCircle(manifold,polygonA,*xfA,circleB,*xfB);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'b2CollidePolygonAndCircle'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: b2CollidePolygons */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2CollidePolygons00
static int tolua_luaBox2D_b2CollidePolygons00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Manifold",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2PolygonShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Transform",0,&tolua_err)) ||
     !tolua_isusertype(tolua_S,4,"const b2PolygonShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const b2Transform",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Manifold* manifold = ((b2Manifold*)  tolua_tousertype(tolua_S,1,0));
  const b2PolygonShape* polygonA = ((const b2PolygonShape*)  tolua_tousertype(tolua_S,2,0));
  const b2Transform* xfA = ((const b2Transform*)  tolua_tousertype(tolua_S,3,0));
  const b2PolygonShape* polygonB = ((const b2PolygonShape*)  tolua_tousertype(tolua_S,4,0));
  const b2Transform* xfB = ((const b2Transform*)  tolua_tousertype(tolua_S,5,0));
  {
   b2CollidePolygons(manifold,polygonA,*xfA,polygonB,*xfB);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'b2CollidePolygons'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: b2CollideEdgeAndCircle */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2CollideEdgeAndCircle00
static int tolua_luaBox2D_b2CollideEdgeAndCircle00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Manifold",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2EdgeShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Transform",0,&tolua_err)) ||
     !tolua_isusertype(tolua_S,4,"const b2CircleShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const b2Transform",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Manifold* manifold = ((b2Manifold*)  tolua_tousertype(tolua_S,1,0));
  const b2EdgeShape* polygonA = ((const b2EdgeShape*)  tolua_tousertype(tolua_S,2,0));
  const b2Transform* xfA = ((const b2Transform*)  tolua_tousertype(tolua_S,3,0));
  const b2CircleShape* circleB = ((const b2CircleShape*)  tolua_tousertype(tolua_S,4,0));
  const b2Transform* xfB = ((const b2Transform*)  tolua_tousertype(tolua_S,5,0));
  {
   b2CollideEdgeAndCircle(manifold,polygonA,*xfA,circleB,*xfB);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'b2CollideEdgeAndCircle'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: b2CollideEdgeAndPolygon */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2CollideEdgeAndPolygon00
static int tolua_luaBox2D_b2CollideEdgeAndPolygon00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"b2Manifold",0,&tolua_err) ||
     !tolua_isusertype(tolua_S,2,"const b2EdgeShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Transform",0,&tolua_err)) ||
     !tolua_isusertype(tolua_S,4,"const b2PolygonShape",0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const b2Transform",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2Manifold* manifold = ((b2Manifold*)  tolua_tousertype(tolua_S,1,0));
  const b2EdgeShape* edgeA = ((const b2EdgeShape*)  tolua_tousertype(tolua_S,2,0));
  const b2Transform* xfA = ((const b2Transform*)  tolua_tousertype(tolua_S,3,0));
  const b2PolygonShape* circleB = ((const b2PolygonShape*)  tolua_tousertype(tolua_S,4,0));
  const b2Transform* xfB = ((const b2Transform*)  tolua_tousertype(tolua_S,5,0));
  {
   b2CollideEdgeAndPolygon(manifold,edgeA,*xfA,circleB,*xfB);
  }
 }
 return 0;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'b2CollideEdgeAndPolygon'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: b2ClipSegmentToLine */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2ClipSegmentToLine00
static int tolua_luaBox2D_b2ClipSegmentToLine00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_istable(tolua_S,1,0,&tolua_err) ||
     !tolua_istable(tolua_S,2,0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,3,&tolua_err) || !tolua_isusertype(tolua_S,3,"const b2Vec2",0,&tolua_err)) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     !tolua_isnumber(tolua_S,5,0,&tolua_err) ||
     !tolua_isnoobj(tolua_S,6,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  b2ClipVertex vOut[2];
  b2ClipVertex vIn[2];
  const b2Vec2* normal = ((const b2Vec2*)  tolua_tousertype(tolua_S,3,0));
   float offset = ((  float)  tolua_tonumber(tolua_S,4,0));
  signed int vertexIndexA = (( signed int)  tolua_tonumber(tolua_S,5,0));
  {
#ifndef TOLUA_RELEASE
   if (!tolua_isusertypearray(tolua_S,1,"b2ClipVertex",2,0,&tolua_err))
    goto tolua_lerror;
   else
#endif
   {
    int i;
    for(i=0; i<2;i++)
    vOut[i] = *((b2ClipVertex*)  tolua_tofieldusertype(tolua_S,1,i+1,0));
   }
  }
  {
#ifndef TOLUA_RELEASE
   if (!tolua_isusertypearray(tolua_S,2,"b2ClipVertex",2,0,&tolua_err))
    goto tolua_lerror;
   else
#endif
   {
    int i;
    for(i=0; i<2;i++)
    vIn[i] = *((b2ClipVertex*)  tolua_tofieldusertype(tolua_S,2,i+1,0));
   }
  }
  {
   signed int tolua_ret = ( signed int)  b2ClipSegmentToLine(vOut,vIn,*normal,offset,vertexIndexA);
   tolua_pushnumber(tolua_S,(lua_Number)tolua_ret);
  }
  {
   int i;
   for(i=0; i<2;i++)
   {
#ifdef __cplusplus
    void* tolua_obj = Mtolua_new((b2ClipVertex)(vOut[i]));
    tolua_pushfieldusertype_and_takeownership(tolua_S,1,i+1,tolua_obj,"b2ClipVertex");
#else
    void* tolua_obj = tolua_copy(tolua_S,(void*)& vOut[i],sizeof(b2ClipVertex));
    tolua_pushfieldusertype(tolua_S,1,i+1,tolua_obj,"b2ClipVertex");
#endif
   }
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'b2ClipSegmentToLine'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: b2TestOverlap */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2TestOverlap00
static int tolua_luaBox2D_b2TestOverlap00(lua_State* tolua_S)
{
#ifndef TOLUA_RELEASE
 tolua_Error tolua_err;
 if (
     !tolua_isusertype(tolua_S,1,"const b2Shape",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,2,0,&tolua_err) ||
     !tolua_isusertype(tolua_S,3,"const b2Shape",0,&tolua_err) ||
     !tolua_isnumber(tolua_S,4,0,&tolua_err) ||
     (tolua_isvaluenil(tolua_S,5,&tolua_err) || !tolua_isusertype(tolua_S,5,"const b2Transform",0,&tolua_err)) ||
     (tolua_isvaluenil(tolua_S,6,&tolua_err) || !tolua_isusertype(tolua_S,6,"const b2Transform",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,7,&tolua_err)
 )
  goto tolua_lerror;
 else
#endif
 {
  const b2Shape* shapeA = ((const b2Shape*)  tolua_tousertype(tolua_S,1,0));
  signed int indexA = (( signed int)  tolua_tonumber(tolua_S,2,0));
  const b2Shape* shapeB = ((const b2Shape*)  tolua_tousertype(tolua_S,3,0));
  signed int indexB = (( signed int)  tolua_tonumber(tolua_S,4,0));
  const b2Transform* xfA = ((const b2Transform*)  tolua_tousertype(tolua_S,5,0));
  const b2Transform* xfB = ((const b2Transform*)  tolua_tousertype(tolua_S,6,0));
  {
   bool tolua_ret = (bool)  b2TestOverlap(shapeA,indexA,shapeB,indexB,*xfA,*xfB);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
#ifndef TOLUA_RELEASE
 tolua_lerror:
 tolua_error(tolua_S,"#ferror in function 'b2TestOverlap'.",&tolua_err);
 return 0;
#endif
}
#endif //#ifndef TOLUA_DISABLE

/* function: b2TestOverlap */
#ifndef TOLUA_DISABLE_tolua_luaBox2D_b2TestOverlap01
static int tolua_luaBox2D_b2TestOverlap01(lua_State* tolua_S)
{
 tolua_Error tolua_err;
 if (
     (tolua_isvaluenil(tolua_S,1,&tolua_err) || !tolua_isusertype(tolua_S,1,"const b2AABB",0,&tolua_err)) ||
     (tolua_isvaluenil(tolua_S,2,&tolua_err) || !tolua_isusertype(tolua_S,2,"const b2AABB",0,&tolua_err)) ||
     !tolua_isnoobj(tolua_S,3,&tolua_err)
 )
  goto tolua_lerror;
 else
 {
  const b2AABB* a = ((const b2AABB*)  tolua_tousertype(tolua_S,1,0));
  const b2AABB* b = ((const b2AABB*)  tolua_tousertype(tolua_S,2,0));
  {
   bool tolua_ret = (bool)  b2TestOverlap(*a,*b);
   tolua_pushboolean(tolua_S,(bool)tolua_ret);
  }
 }
 return 1;
tolua_lerror:
 return tolua_luaBox2D_b2TestOverlap00(tolua_S);
}
#endif //#ifndef TOLUA_DISABLE

/* Open function */
TOLUA_API int tolua_luaBox2D_open (lua_State* tolua_S)
{
 tolua_open(tolua_S);
 tolua_reg_types(tolua_S);
 tolua_module(tolua_S,NULL,0);
 tolua_beginmodule(tolua_S,NULL);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"b2World","b2World","",tolua_collect_b2World);
  #else
  tolua_cclass(tolua_S,"b2World","b2World","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"b2World");
   tolua_function(tolua_S,"new",tolua_luaBox2D_b2World_new00);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_b2World_new00_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_b2World_new00_local);
   tolua_function(tolua_S,"delete",tolua_luaBox2D_b2World_delete00);
   tolua_function(tolua_S,"SetDestructionListener",tolua_luaBox2D_b2World_SetDestructionListener00);
   tolua_function(tolua_S,"SetContactFilter",tolua_luaBox2D_b2World_SetContactFilter00);
   tolua_function(tolua_S,"SetContactListener",tolua_luaBox2D_b2World_SetContactListener00);
   tolua_function(tolua_S,"SetDebugDraw",tolua_luaBox2D_b2World_SetDebugDraw00);
   tolua_function(tolua_S,"CreateBody",tolua_luaBox2D_b2World_CreateBody00);
   tolua_function(tolua_S,"DestroyBody",tolua_luaBox2D_b2World_DestroyBody00);
   tolua_function(tolua_S,"CreateJoint",tolua_luaBox2D_b2World_CreateJoint00);
   tolua_function(tolua_S,"DestroyJoint",tolua_luaBox2D_b2World_DestroyJoint00);
   tolua_function(tolua_S,"Step",tolua_luaBox2D_b2World_Step00);
   tolua_function(tolua_S,"ClearForces",tolua_luaBox2D_b2World_ClearForces00);
   tolua_function(tolua_S,"DrawDebugData",tolua_luaBox2D_b2World_DrawDebugData00);
   tolua_function(tolua_S,"QueryAABB",tolua_luaBox2D_b2World_QueryAABB00);
   tolua_function(tolua_S,"RayCast",tolua_luaBox2D_b2World_RayCast00);
   tolua_function(tolua_S,"GetBodyList",tolua_luaBox2D_b2World_GetBodyList00);
   tolua_function(tolua_S,"GetBodyList",tolua_luaBox2D_b2World_GetBodyList01);
   tolua_function(tolua_S,"GetJointList",tolua_luaBox2D_b2World_GetJointList00);
   tolua_function(tolua_S,"GetJointList",tolua_luaBox2D_b2World_GetJointList01);
   tolua_function(tolua_S,"GetContactList",tolua_luaBox2D_b2World_GetContactList00);
   tolua_function(tolua_S,"GetContactList",tolua_luaBox2D_b2World_GetContactList01);
   tolua_function(tolua_S,"SetAllowSleeping",tolua_luaBox2D_b2World_SetAllowSleeping00);
   tolua_function(tolua_S,"GetAllowSleeping",tolua_luaBox2D_b2World_GetAllowSleeping00);
   tolua_function(tolua_S,"SetWarmStarting",tolua_luaBox2D_b2World_SetWarmStarting00);
   tolua_function(tolua_S,"GetWarmStarting",tolua_luaBox2D_b2World_GetWarmStarting00);
   tolua_function(tolua_S,"SetContinuousPhysics",tolua_luaBox2D_b2World_SetContinuousPhysics00);
   tolua_function(tolua_S,"GetContinuousPhysics",tolua_luaBox2D_b2World_GetContinuousPhysics00);
   tolua_function(tolua_S,"SetSubStepping",tolua_luaBox2D_b2World_SetSubStepping00);
   tolua_function(tolua_S,"GetSubStepping",tolua_luaBox2D_b2World_GetSubStepping00);
   tolua_function(tolua_S,"GetProxyCount",tolua_luaBox2D_b2World_GetProxyCount00);
   tolua_function(tolua_S,"GetBodyCount",tolua_luaBox2D_b2World_GetBodyCount00);
   tolua_function(tolua_S,"GetJointCount",tolua_luaBox2D_b2World_GetJointCount00);
   tolua_function(tolua_S,"GetContactCount",tolua_luaBox2D_b2World_GetContactCount00);
   tolua_function(tolua_S,"GetTreeHeight",tolua_luaBox2D_b2World_GetTreeHeight00);
   tolua_function(tolua_S,"GetTreeBalance",tolua_luaBox2D_b2World_GetTreeBalance00);
   tolua_function(tolua_S,"GetTreeQuality",tolua_luaBox2D_b2World_GetTreeQuality00);
   tolua_function(tolua_S,"SetGravity",tolua_luaBox2D_b2World_SetGravity00);
   tolua_function(tolua_S,"GetGravity",tolua_luaBox2D_b2World_GetGravity00);
   tolua_function(tolua_S,"IsLocked",tolua_luaBox2D_b2World_IsLocked00);
   tolua_function(tolua_S,"SetAutoClearForces",tolua_luaBox2D_b2World_SetAutoClearForces00);
   tolua_function(tolua_S,"GetAutoClearForces",tolua_luaBox2D_b2World_GetAutoClearForces00);
   tolua_function(tolua_S,"GetContactManager",tolua_luaBox2D_b2World_GetContactManager00);
   tolua_function(tolua_S,"GetProfile",tolua_luaBox2D_b2World_GetProfile00);
   tolua_function(tolua_S,"Dump",tolua_luaBox2D_b2World_Dump00);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"b2Filter","b2Filter","",tolua_collect_b2Filter);
  #else
  tolua_cclass(tolua_S,"b2Filter","b2Filter","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"b2Filter");
   tolua_function(tolua_S,"new",tolua_luaBox2D_b2Filter_new00);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_b2Filter_new00_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_b2Filter_new00_local);
   tolua_variable(tolua_S,"categoryBits",tolua_get_b2Filter_unsigned_categoryBits,tolua_set_b2Filter_unsigned_categoryBits);
   tolua_variable(tolua_S,"maskBits",tolua_get_b2Filter_unsigned_maskBits,tolua_set_b2Filter_unsigned_maskBits);
   tolua_variable(tolua_S,"groupIndex",tolua_get_b2Filter_groupIndex,tolua_set_b2Filter_groupIndex);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"b2FixtureDef","b2FixtureDef","",tolua_collect_b2FixtureDef);
  #else
  tolua_cclass(tolua_S,"b2FixtureDef","b2FixtureDef","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"b2FixtureDef");
   tolua_function(tolua_S,"new",tolua_luaBox2D_b2FixtureDef_new00);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_b2FixtureDef_new00_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_b2FixtureDef_new00_local);
   tolua_variable(tolua_S,"shape",tolua_get_b2FixtureDef_shape_ptr,NULL);
   tolua_variable(tolua_S,"userData",tolua_get_b2FixtureDef_userData,tolua_set_b2FixtureDef_userData);
   tolua_variable(tolua_S,"friction",tolua_get_b2FixtureDef_friction,tolua_set_b2FixtureDef_friction);
   tolua_variable(tolua_S,"restitution",tolua_get_b2FixtureDef_restitution,tolua_set_b2FixtureDef_restitution);
   tolua_variable(tolua_S,"density",tolua_get_b2FixtureDef_density,tolua_set_b2FixtureDef_density);
   tolua_variable(tolua_S,"isSensor",tolua_get_b2FixtureDef_isSensor,tolua_set_b2FixtureDef_isSensor);
   tolua_variable(tolua_S,"filter",tolua_get_b2FixtureDef_filter,tolua_set_b2FixtureDef_filter);
  tolua_endmodule(tolua_S);
  tolua_cclass(tolua_S,"b2FixtureProxy","b2FixtureProxy","",NULL);
  tolua_beginmodule(tolua_S,"b2FixtureProxy");
   tolua_variable(tolua_S,"aabb",tolua_get_b2FixtureProxy_aabb,tolua_set_b2FixtureProxy_aabb);
   tolua_variable(tolua_S,"fixture",tolua_get_b2FixtureProxy_fixture_ptr,tolua_set_b2FixtureProxy_fixture_ptr);
   tolua_variable(tolua_S,"childIndex",tolua_get_b2FixtureProxy_childIndex,tolua_set_b2FixtureProxy_childIndex);
   tolua_variable(tolua_S,"proxyId",tolua_get_b2FixtureProxy_proxyId,tolua_set_b2FixtureProxy_proxyId);
  tolua_endmodule(tolua_S);
  tolua_cclass(tolua_S,"b2Fixture","b2Fixture","",NULL);
  tolua_beginmodule(tolua_S,"b2Fixture");
   tolua_function(tolua_S,"GetType",tolua_luaBox2D_b2Fixture_GetType00);
   tolua_function(tolua_S,"GetShape",tolua_luaBox2D_b2Fixture_GetShape00);
   tolua_function(tolua_S,"GetShape",tolua_luaBox2D_b2Fixture_GetShape01);
   tolua_function(tolua_S,"SetSensor",tolua_luaBox2D_b2Fixture_SetSensor00);
   tolua_function(tolua_S,"IsSensor",tolua_luaBox2D_b2Fixture_IsSensor00);
   tolua_function(tolua_S,"SetFilterData",tolua_luaBox2D_b2Fixture_SetFilterData00);
   tolua_function(tolua_S,"GetFilterData",tolua_luaBox2D_b2Fixture_GetFilterData00);
   tolua_function(tolua_S,"Refilter",tolua_luaBox2D_b2Fixture_Refilter00);
   tolua_function(tolua_S,"GetBody",tolua_luaBox2D_b2Fixture_GetBody00);
   tolua_function(tolua_S,"GetBody",tolua_luaBox2D_b2Fixture_GetBody01);
   tolua_function(tolua_S,"GetNext",tolua_luaBox2D_b2Fixture_GetNext00);
   tolua_function(tolua_S,"GetNext",tolua_luaBox2D_b2Fixture_GetNext01);
   tolua_function(tolua_S,"GetUserData",tolua_luaBox2D_b2Fixture_GetUserData00);
   tolua_function(tolua_S,"SetUserData",tolua_luaBox2D_b2Fixture_SetUserData00);
   tolua_function(tolua_S,"TestPoint",tolua_luaBox2D_b2Fixture_TestPoint00);
   tolua_function(tolua_S,"RayCast",tolua_luaBox2D_b2Fixture_RayCast00);
   tolua_function(tolua_S,"GetMassData",tolua_luaBox2D_b2Fixture_GetMassData00);
   tolua_function(tolua_S,"SetDensity",tolua_luaBox2D_b2Fixture_SetDensity00);
   tolua_function(tolua_S,"GetDensity",tolua_luaBox2D_b2Fixture_GetDensity00);
   tolua_function(tolua_S,"GetFriction",tolua_luaBox2D_b2Fixture_GetFriction00);
   tolua_function(tolua_S,"SetFriction",tolua_luaBox2D_b2Fixture_SetFriction00);
   tolua_function(tolua_S,"GetRestitution",tolua_luaBox2D_b2Fixture_GetRestitution00);
   tolua_function(tolua_S,"SetRestitution",tolua_luaBox2D_b2Fixture_SetRestitution00);
   tolua_function(tolua_S,"GetAABB",tolua_luaBox2D_b2Fixture_GetAABB00);
   tolua_function(tolua_S,"Dump",tolua_luaBox2D_b2Fixture_Dump00);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"b2BodyDef","b2BodyDef","",tolua_collect_b2BodyDef);
  #else
  tolua_cclass(tolua_S,"b2BodyDef","b2BodyDef","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"b2BodyDef");
   tolua_function(tolua_S,"new",tolua_luaBox2D_b2BodyDef_new00);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_b2BodyDef_new00_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_b2BodyDef_new00_local);
   tolua_variable(tolua_S,"type",tolua_get_b2BodyDef_type,tolua_set_b2BodyDef_type);
   tolua_variable(tolua_S,"position",tolua_get_b2BodyDef_position,tolua_set_b2BodyDef_position);
   tolua_variable(tolua_S,"angle",tolua_get_b2BodyDef_angle,tolua_set_b2BodyDef_angle);
   tolua_variable(tolua_S,"linearVelocity",tolua_get_b2BodyDef_linearVelocity,tolua_set_b2BodyDef_linearVelocity);
   tolua_variable(tolua_S,"angularVelocity",tolua_get_b2BodyDef_angularVelocity,tolua_set_b2BodyDef_angularVelocity);
   tolua_variable(tolua_S,"linearDamping",tolua_get_b2BodyDef_linearDamping,tolua_set_b2BodyDef_linearDamping);
   tolua_variable(tolua_S,"angularDamping",tolua_get_b2BodyDef_angularDamping,tolua_set_b2BodyDef_angularDamping);
   tolua_variable(tolua_S,"allowSleep",tolua_get_b2BodyDef_allowSleep,tolua_set_b2BodyDef_allowSleep);
   tolua_variable(tolua_S,"awake",tolua_get_b2BodyDef_awake,tolua_set_b2BodyDef_awake);
   tolua_variable(tolua_S,"fixedRotation",tolua_get_b2BodyDef_fixedRotation,tolua_set_b2BodyDef_fixedRotation);
   tolua_variable(tolua_S,"bullet",tolua_get_b2BodyDef_bullet,tolua_set_b2BodyDef_bullet);
   tolua_variable(tolua_S,"active",tolua_get_b2BodyDef_active,tolua_set_b2BodyDef_active);
   tolua_variable(tolua_S,"userData",tolua_get_b2BodyDef_userData,tolua_set_b2BodyDef_userData);
   tolua_variable(tolua_S,"gravityScale",tolua_get_b2BodyDef_gravityScale,tolua_set_b2BodyDef_gravityScale);
  tolua_endmodule(tolua_S);
  tolua_cclass(tolua_S,"b2Body","b2Body","",NULL);
  tolua_beginmodule(tolua_S,"b2Body");
   tolua_function(tolua_S,"CreateFixture",tolua_luaBox2D_b2Body_CreateFixture00);
   tolua_function(tolua_S,"CreateFixture",tolua_luaBox2D_b2Body_CreateFixture01);
   tolua_function(tolua_S,"DestroyFixture",tolua_luaBox2D_b2Body_DestroyFixture00);
   tolua_function(tolua_S,"SetTransform",tolua_luaBox2D_b2Body_SetTransform00);
   tolua_function(tolua_S,"GetTransform",tolua_luaBox2D_b2Body_GetTransform00);
   tolua_function(tolua_S,"GetPosition",tolua_luaBox2D_b2Body_GetPosition00);
   tolua_function(tolua_S,"GetAngle",tolua_luaBox2D_b2Body_GetAngle00);
   tolua_function(tolua_S,"GetWorldCenter",tolua_luaBox2D_b2Body_GetWorldCenter00);
   tolua_function(tolua_S,"GetLocalCenter",tolua_luaBox2D_b2Body_GetLocalCenter00);
   tolua_function(tolua_S,"SetLinearVelocity",tolua_luaBox2D_b2Body_SetLinearVelocity00);
   tolua_function(tolua_S,"GetLinearVelocity",tolua_luaBox2D_b2Body_GetLinearVelocity00);
   tolua_function(tolua_S,"SetAngularVelocity",tolua_luaBox2D_b2Body_SetAngularVelocity00);
   tolua_function(tolua_S,"GetAngularVelocity",tolua_luaBox2D_b2Body_GetAngularVelocity00);
   tolua_function(tolua_S,"ApplyForce",tolua_luaBox2D_b2Body_ApplyForce00);
   tolua_function(tolua_S,"ApplyForceToCenter",tolua_luaBox2D_b2Body_ApplyForceToCenter00);
   tolua_function(tolua_S,"ApplyTorque",tolua_luaBox2D_b2Body_ApplyTorque00);
   tolua_function(tolua_S,"ApplyLinearImpulse",tolua_luaBox2D_b2Body_ApplyLinearImpulse00);
   tolua_function(tolua_S,"ApplyAngularImpulse",tolua_luaBox2D_b2Body_ApplyAngularImpulse00);
   tolua_function(tolua_S,"GetMass",tolua_luaBox2D_b2Body_GetMass00);
   tolua_function(tolua_S,"GetInertia",tolua_luaBox2D_b2Body_GetInertia00);
   tolua_function(tolua_S,"GetMassData",tolua_luaBox2D_b2Body_GetMassData00);
   tolua_function(tolua_S,"SetMassData",tolua_luaBox2D_b2Body_SetMassData00);
   tolua_function(tolua_S,"ResetMassData",tolua_luaBox2D_b2Body_ResetMassData00);
   tolua_function(tolua_S,"GetWorldPoint",tolua_luaBox2D_b2Body_GetWorldPoint00);
   tolua_function(tolua_S,"GetWorldVector",tolua_luaBox2D_b2Body_GetWorldVector00);
   tolua_function(tolua_S,"GetLocalPoint",tolua_luaBox2D_b2Body_GetLocalPoint00);
   tolua_function(tolua_S,"GetLocalVector",tolua_luaBox2D_b2Body_GetLocalVector00);
   tolua_function(tolua_S,"GetLinearVelocityFromWorldPoint",tolua_luaBox2D_b2Body_GetLinearVelocityFromWorldPoint00);
   tolua_function(tolua_S,"GetLinearVelocityFromLocalPoint",tolua_luaBox2D_b2Body_GetLinearVelocityFromLocalPoint00);
   tolua_function(tolua_S,"GetLinearDamping",tolua_luaBox2D_b2Body_GetLinearDamping00);
   tolua_function(tolua_S,"SetLinearDamping",tolua_luaBox2D_b2Body_SetLinearDamping00);
   tolua_function(tolua_S,"GetAngularDamping",tolua_luaBox2D_b2Body_GetAngularDamping00);
   tolua_function(tolua_S,"SetAngularDamping",tolua_luaBox2D_b2Body_SetAngularDamping00);
   tolua_function(tolua_S,"GetGravityScale",tolua_luaBox2D_b2Body_GetGravityScale00);
   tolua_function(tolua_S,"SetGravityScale",tolua_luaBox2D_b2Body_SetGravityScale00);
   tolua_function(tolua_S,"SetType",tolua_luaBox2D_b2Body_SetType00);
   tolua_function(tolua_S,"GetType",tolua_luaBox2D_b2Body_GetType00);
   tolua_function(tolua_S,"SetBullet",tolua_luaBox2D_b2Body_SetBullet00);
   tolua_function(tolua_S,"IsBullet",tolua_luaBox2D_b2Body_IsBullet00);
   tolua_function(tolua_S,"SetSleepingAllowed",tolua_luaBox2D_b2Body_SetSleepingAllowed00);
   tolua_function(tolua_S,"IsSleepingAllowed",tolua_luaBox2D_b2Body_IsSleepingAllowed00);
   tolua_function(tolua_S,"SetAwake",tolua_luaBox2D_b2Body_SetAwake00);
   tolua_function(tolua_S,"IsAwake",tolua_luaBox2D_b2Body_IsAwake00);
   tolua_function(tolua_S,"SetActive",tolua_luaBox2D_b2Body_SetActive00);
   tolua_function(tolua_S,"IsActive",tolua_luaBox2D_b2Body_IsActive00);
   tolua_function(tolua_S,"SetFixedRotation",tolua_luaBox2D_b2Body_SetFixedRotation00);
   tolua_function(tolua_S,"IsFixedRotation",tolua_luaBox2D_b2Body_IsFixedRotation00);
   tolua_function(tolua_S,"GetFixtureList",tolua_luaBox2D_b2Body_GetFixtureList00);
   tolua_function(tolua_S,"GetFixtureList",tolua_luaBox2D_b2Body_GetFixtureList01);
   tolua_function(tolua_S,"GetJointList",tolua_luaBox2D_b2Body_GetJointList00);
   tolua_function(tolua_S,"GetJointList",tolua_luaBox2D_b2Body_GetJointList01);
   tolua_function(tolua_S,"GetContactList",tolua_luaBox2D_b2Body_GetContactList00);
   tolua_function(tolua_S,"GetContactList",tolua_luaBox2D_b2Body_GetContactList01);
   tolua_function(tolua_S,"GetNext",tolua_luaBox2D_b2Body_GetNext00);
   tolua_function(tolua_S,"GetNext",tolua_luaBox2D_b2Body_GetNext01);
   tolua_function(tolua_S,"GetUserData",tolua_luaBox2D_b2Body_GetUserData00);
   tolua_function(tolua_S,"SetUserData",tolua_luaBox2D_b2Body_SetUserData00);
   tolua_function(tolua_S,"GetWorld",tolua_luaBox2D_b2Body_GetWorld00);
   tolua_function(tolua_S,"GetWorld",tolua_luaBox2D_b2Body_GetWorld01);
   tolua_function(tolua_S,"Dump",tolua_luaBox2D_b2Body_Dump00);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"b2Vec2","b2Vec2","",tolua_collect_b2Vec2);
  #else
  tolua_cclass(tolua_S,"b2Vec2","b2Vec2","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"b2Vec2");
   tolua_function(tolua_S,"new",tolua_luaBox2D_b2Vec2_new00);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_b2Vec2_new00_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_b2Vec2_new00_local);
   tolua_function(tolua_S,"new",tolua_luaBox2D_b2Vec2_new01);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_b2Vec2_new01_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_b2Vec2_new01_local);
   tolua_function(tolua_S,"SetZero",tolua_luaBox2D_b2Vec2_SetZero00);
   tolua_function(tolua_S,"Set",tolua_luaBox2D_b2Vec2_Set00);
   tolua_function(tolua_S,"Length",tolua_luaBox2D_b2Vec2_Length00);
   tolua_function(tolua_S,"LengthSquared",tolua_luaBox2D_b2Vec2_LengthSquared00);
   tolua_function(tolua_S,"Normalize",tolua_luaBox2D_b2Vec2_Normalize00);
   tolua_function(tolua_S,"IsValid",tolua_luaBox2D_b2Vec2_IsValid00);
   tolua_function(tolua_S,"Skew",tolua_luaBox2D_b2Vec2_Skew00);
   tolua_variable(tolua_S,"x",tolua_get_b2Vec2_x,tolua_set_b2Vec2_x);
   tolua_variable(tolua_S,"y",tolua_get_b2Vec2_y,tolua_set_b2Vec2_y);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"b2Transform","b2Transform","",tolua_collect_b2Transform);
  #else
  tolua_cclass(tolua_S,"b2Transform","b2Transform","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"b2Transform");
   tolua_function(tolua_S,"new",tolua_luaBox2D_b2Transform_new00);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_b2Transform_new00_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_b2Transform_new00_local);
   tolua_function(tolua_S,"new",tolua_luaBox2D_b2Transform_new01);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_b2Transform_new01_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_b2Transform_new01_local);
   tolua_function(tolua_S,"SetIdentity",tolua_luaBox2D_b2Transform_SetIdentity00);
   tolua_function(tolua_S,"Set",tolua_luaBox2D_b2Transform_Set00);
   tolua_variable(tolua_S,"p",tolua_get_b2Transform_p,tolua_set_b2Transform_p);
   tolua_variable(tolua_S,"q",tolua_get_b2Transform_q,tolua_set_b2Transform_q);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"QueryCallback","QueryCallback","b2QueryCallback",tolua_collect_QueryCallback);
  #else
  tolua_cclass(tolua_S,"QueryCallback","QueryCallback","b2QueryCallback",NULL);
  #endif
  tolua_beginmodule(tolua_S,"QueryCallback");
   tolua_function(tolua_S,"new",tolua_luaBox2D_QueryCallback_new00);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_QueryCallback_new00_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_QueryCallback_new00_local);
   tolua_function(tolua_S,"delete",tolua_luaBox2D_QueryCallback_delete00);
   tolua_function(tolua_S,"ReportFixture",tolua_luaBox2D_QueryCallback_ReportFixture00);
  tolua_endmodule(tolua_S);
  tolua_cclass(tolua_S,"b2ContactFeature","b2ContactFeature","",NULL);
  tolua_beginmodule(tolua_S,"b2ContactFeature");
   tolua_constant(tolua_S,"e_vertex",b2ContactFeature::e_vertex);
   tolua_constant(tolua_S,"e_face",b2ContactFeature::e_face);
   tolua_variable(tolua_S,"indexA",tolua_get_b2ContactFeature_unsigned_indexA,tolua_set_b2ContactFeature_unsigned_indexA);
   tolua_variable(tolua_S,"indexB",tolua_get_b2ContactFeature_unsigned_indexB,tolua_set_b2ContactFeature_unsigned_indexB);
   tolua_variable(tolua_S,"typeA",tolua_get_b2ContactFeature_unsigned_typeA,tolua_set_b2ContactFeature_unsigned_typeA);
   tolua_variable(tolua_S,"typeB",tolua_get_b2ContactFeature_unsigned_typeB,tolua_set_b2ContactFeature_unsigned_typeB);
  tolua_endmodule(tolua_S);
  tolua_cclass(tolua_S,"b2ContactID","b2ContactID","",NULL);
  tolua_beginmodule(tolua_S,"b2ContactID");
   tolua_variable(tolua_S,"cf",tolua_get_b2ContactID_cf,tolua_set_b2ContactID_cf);
   tolua_variable(tolua_S,"key",tolua_get_b2ContactID_unsigned_key,tolua_set_b2ContactID_unsigned_key);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"b2ClipVertex","b2ClipVertex","",tolua_collect_b2ClipVertex);
  #else
  tolua_cclass(tolua_S,"b2ClipVertex","b2ClipVertex","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"b2ClipVertex");
   tolua_variable(tolua_S,"v",tolua_get_b2ClipVertex_v,tolua_set_b2ClipVertex_v);
   tolua_variable(tolua_S,"id",tolua_get_b2ClipVertex_id,tolua_set_b2ClipVertex_id);
  tolua_endmodule(tolua_S);
  #ifdef __cplusplus
  tolua_cclass(tolua_S,"b2AABB","b2AABB","",tolua_collect_b2AABB);
  #else
  tolua_cclass(tolua_S,"b2AABB","b2AABB","",NULL);
  #endif
  tolua_beginmodule(tolua_S,"b2AABB");
   tolua_function(tolua_S,"new",tolua_luaBox2D_b2AABB_new00);
   tolua_function(tolua_S,"new_local",tolua_luaBox2D_b2AABB_new00_local);
   tolua_function(tolua_S,".call",tolua_luaBox2D_b2AABB_new00_local);
   tolua_function(tolua_S,"IsValid",tolua_luaBox2D_b2AABB_IsValid00);
   tolua_function(tolua_S,"GetCenter",tolua_luaBox2D_b2AABB_GetCenter00);
   tolua_function(tolua_S,"GetExtents",tolua_luaBox2D_b2AABB_GetExtents00);
   tolua_function(tolua_S,"GetPerimeter",tolua_luaBox2D_b2AABB_GetPerimeter00);
   tolua_function(tolua_S,"Combine",tolua_luaBox2D_b2AABB_Combine00);
   tolua_function(tolua_S,"Combine",tolua_luaBox2D_b2AABB_Combine01);
   tolua_function(tolua_S,"Contains",tolua_luaBox2D_b2AABB_Contains00);
   tolua_function(tolua_S,"RayCast",tolua_luaBox2D_b2AABB_RayCast00);
   tolua_variable(tolua_S,"lowerBound",tolua_get_b2AABB_lowerBound,tolua_set_b2AABB_lowerBound);
   tolua_variable(tolua_S,"upperBound",tolua_get_b2AABB_upperBound,tolua_set_b2AABB_upperBound);
  tolua_endmodule(tolua_S);
  tolua_function(tolua_S,"b2CollideCircles",tolua_luaBox2D_b2CollideCircles00);
  tolua_function(tolua_S,"b2CollidePolygonAndCircle",tolua_luaBox2D_b2CollidePolygonAndCircle00);
  tolua_function(tolua_S,"b2CollidePolygons",tolua_luaBox2D_b2CollidePolygons00);
  tolua_function(tolua_S,"b2CollideEdgeAndCircle",tolua_luaBox2D_b2CollideEdgeAndCircle00);
  tolua_function(tolua_S,"b2CollideEdgeAndPolygon",tolua_luaBox2D_b2CollideEdgeAndPolygon00);
  tolua_function(tolua_S,"b2ClipSegmentToLine",tolua_luaBox2D_b2ClipSegmentToLine00);
  tolua_function(tolua_S,"b2TestOverlap",tolua_luaBox2D_b2TestOverlap00);
  tolua_function(tolua_S,"b2TestOverlap",tolua_luaBox2D_b2TestOverlap01);
 tolua_endmodule(tolua_S);
 return 1;
}


#if defined(LUA_VERSION_NUM) && LUA_VERSION_NUM >= 501
 TOLUA_API int luaopen_luaBox2D (lua_State* tolua_S) {
 return tolua_luaBox2D_open(tolua_S);
};
#endif

